- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jan 16, 2023 12:03 PM
Hey Airtable community
We're a 100% volunteer non profit organization, using Airtable to handle events where we match street artists with underserved communities and local organizers. That means dealing with a lot of images and we're maxing out the 20GB in our Pro plan.
With inspiration from John Siciliano's post where he build an image compressor with TinyPng for a single image, I wanted to extend it a bit. A friend tried to add:
- multi-image iteration,
- renaming,
- image resizing
- move PDF's to a different cell in the record
and got something put together on top of John's script. However, when it runs, it keeps looping through logs "compress null" and "TinyPNG API failed with status code: 400 and message: Bad Request"
He's a bit excessive with his let-variables, but I don't see that being the cause. Can anyone help make the script run properly? Any help will be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jan 16, 2023 06:38 PM
Hey @Streetstudies!
I'm unfamiliar with TinyPNG, so I can't offer immediate help on the script itself. Still, I wanted to call out a workaround for you and your organization, specifically since you're knocking on the door of scalability issues if y'all are going to remain Pro for the foreseeable future.
It would be worth investing the development time into having Airtable push your attachments into an S3 or Google Cloud Storage bucket and then rely on Airtable to pseudo-index them after deleting the Airtable-hosted attachments.
This will ensure that you never have to worry about attachment limits.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jan 16, 2023 07:13 PM
Some more thoughts about using Airtable and attachment limits ...
- Attachments can count towards your attachment limit even after they have been deleted. This is so that attachments can be restored from the trash, snapshots, etc.
- This script will not gracefully handle records that do not have any attachments in them.
- This script doesn't appear to actually do anything with the compressed result. It seems to move the original attachment from one field to another and rename the attachment, but the new field has the same uncompressed image, just with a new name.
- If you want a small version of the image, you could replace an image with one of the Airtable generated thumbnails that is available via scripting.
