I made the mistake of not constraining images uploaded by users and have racked up 6GB+ of images in a few days Is there a way I can bulk resize all the images in the database? Each image is referenced in a User field.
Two things I donāt understand about it:
How to create a workflow to make changes to each user in the database
I canāt see any action that would allowing resizing, just Imgx setting the compression quality which I already did and didnāt stop 5,000px wide images
Explore a service called publitio or any other service where you can send the image and get it back compressed. Or even better ā¦ hosted there and if it allows you to change the size of the image dynamically even better! (Publitio does this)
As for āfixingā the current ones you would have to build logic and api calls to extract / transform / re-save them to your dB ā¦ or to just host them in an external service.
TinyPNG provides APIās to compress and resize images. Maybe you can use one of these options:
There is a free plugin which can compress images. Maybe Olivier Coolen who created this plugin is willing to add the option to resize images.
It is possible to see the plugin code for the plugin above (see the link), so using that as an example together with the documentation for the TinyPNG API you might be able to add the the resize option to your app using Bubbleās API connector plugin.
There is a paid plugin for TinyPNG which already has the option to resize images.
N8N.io (does automation like Zapier and Make) als provides the option to resize images. Since a couple of weeks/months they have a desktop version so you can easily play around with it.
I use Croppie plugin. You can setup the maximum file size in bytes or compress when save which is not higher than 250Kb (usualy is 100kb to 150kb) a picture from mobile. You can show a popup when the image is too large as well.