TinyPNG HTTP API return Binary after resize, how to put it in Glide Table?

Hi, Glide Experts,

Need help on Cloudinary to Glide Table. I have image upload to Cloudinary with resize as preset. Things working well with MAKE. However, I found that Glide table has very slow sync with Cloudinary image stored. FYI, I can direct access the image from Cloudinary with URL less than 1 minute, but it take more than 10mins for Glide table and yet… it doesnt appear.

So when a user uploads an image, you send the URL to Make, then upload that image to Cloudinary and bring the Cloudinary URL back to Glide?

Hi Thinh,

Sorry for late. I am using a hard-coded ROWID in glide table to form the URL. With few days of experiment. The URL is correct, because i can check directly from another tab. 1 thing i notice, it depends on the speed of internet, since I am from Malaysia. The round-trip might be long from Glide → MAKE → Cloudinary → Glide. Sometimes, I can get it reflected within 5mins, but sometimes it doesnt.

5 mins sounds like a lot though. I assume these are all stored in Glide Tables and you’re using the API to communicate with it?

Hi Thinh,

Yes, initially, i was thinking to use Tinypng to resize from 4MB camera image down to 386x224. However, Based on TinyPNG API, the Resize will return BITMAP rather than optimzied.jpg. The MAKE HTTP request module can’t fulfill this “–output optimzied.jpg” command. If this work, then the optimizied.jpg can be store directly to Glide table. Maybe Glide expert can help with this flow? I had asked MAKE community for this.

You can’t send binary image data via the Glide API.

Essentially you have two choices:

  • Store the image elsewhere, retrieve the public URL to the stored image, and send that URL back to Glide, or
  • Send the image to Glide as a base64 encoded text string.

If you choose the 2nd option, to display the image in Glide you would need to use a template column to construct a data URI from the base64 encoded data.

Thanks, Darren.

i’d prefer option1, if TinyPNG API can have an option in HTTP request to return whole image, or MAKE module that can convert BITMAP into whole image. I am curious how Glider are using TinyPNG Resize API. Actualy, the compresion API has no problem ask TinyPNG will return an URL, but the Resize doesnt.

I think most compressor API out there either export a temporary URL for you (will be deleted in a certain amount of time), or give you the binary data then you have to work with that on your own.

I think this is your best bet. Wouldn’t a webhook > TinyPNG > Upload to Cloudinary > Send Cloudinary URL to Glide work?

Thanks for all the suggestions, Thinh & Darren. Appreciate that. :slightly_smiling_face:

I made this change. Webhook → Cloudinary (Upload Preset) → URL in GlideTable. It works just fine with random delay (~20second to 2mins) to reflect the image in Glide. It is a cheaper fix for now.

1 Like