<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Reduce FGDB Attachment Size in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/reduce-fgdb-attachment-size/m-p/1350984#M37713</link>
    <description>&lt;P&gt;Is there a method that will allow one to reduce the size (ie photo resolution) of fgdb record attachments, while they are still attached to the records inside the fgdb (as opposed to downloading the files and resizing outside of the fgdb)?&lt;/P&gt;</description>
    <pubDate>Fri, 17 Nov 2023 18:35:27 GMT</pubDate>
    <dc:creator>Blevins_Mark</dc:creator>
    <dc:date>2023-11-17T18:35:27Z</dc:date>
    <item>
      <title>Reduce FGDB Attachment Size</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/reduce-fgdb-attachment-size/m-p/1350984#M37713</link>
      <description>&lt;P&gt;Is there a method that will allow one to reduce the size (ie photo resolution) of fgdb record attachments, while they are still attached to the records inside the fgdb (as opposed to downloading the files and resizing outside of the fgdb)?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 18:35:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/reduce-fgdb-attachment-size/m-p/1350984#M37713</guid>
      <dc:creator>Blevins_Mark</dc:creator>
      <dc:date>2023-11-17T18:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reduce FGDB Attachment Size</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/reduce-fgdb-attachment-size/m-p/1351297#M37718</link>
      <description>&lt;P&gt;If the attachments are stored in a BLOB field, which I think they would be, I do not think you can make changes to the attachments.&amp;nbsp; I think you would need to write the attachments out to a different format, make the resolution changes, and then save back in BLOB format.&amp;nbsp; Seems like a ton of work.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2023 22:51:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/reduce-fgdb-attachment-size/m-p/1351297#M37718</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2023-11-19T22:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reduce FGDB Attachment Size</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/reduce-fgdb-attachment-size/m-p/1351465#M37721</link>
      <description>&lt;P&gt;Thanks. I think you are right on all fronts, especially the ton of work part.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 14:54:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/reduce-fgdb-attachment-size/m-p/1351465#M37721</guid>
      <dc:creator>Blevins_Mark</dc:creator>
      <dc:date>2023-11-20T14:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reduce FGDB Attachment Size</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/reduce-fgdb-attachment-size/m-p/1657055#M43222</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I know it's an old thread but in case someone stumbles upon this issue I managed to compress them with this snippet&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Tested in ArcGIS PRO 3.5.x
import arcpy
import os
import tempfile
from PIL import Image
import io

# Attachment table
in_table = ""
quality = 70

with tempfile.TemporaryDirectory() as tmpdirname:
    with arcpy.da.UpdateCursor(in_table, ['DATA', 'ATT_NAME', 'DATA_SIZE']) as cursor:
        for row in cursor:
            attachment = row[0]
            filename = row[1]
            exported_img = os.path.join(tmpdirname, filename)
            open(exported_img, 'wb').write(attachment.tobytes())
            image = Image.open(exported_img)
            stream = io.BytesIO()
            image.save(stream, format='JPEG', quality=quality, exif=image.info.get("exif"))
            imagebytes = stream.getvalue()
            row[0] = imagebytes
            row[2] = len(imagebytes)
            cursor.updateRow(row)&lt;/LI-CODE&gt;&lt;P&gt;It was tested on one of the two identical FileGDBs, which is actually compressing them based on the output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kepa_0-1760095626902.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/141786i044311AC2E9ED895/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kepa_0-1760095626902.png" alt="Kepa_0-1760095626902.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Funny thing, the FileGDB size itself does not seem to shrink by itself, it's like it maintains the allocated storage. But that's for another day...&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Oct 2025 11:33:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/reduce-fgdb-attachment-size/m-p/1657055#M43222</guid>
      <dc:creator>Kepa</dc:creator>
      <dc:date>2025-10-10T11:33:15Z</dc:date>
    </item>
  </channel>
</rss>

