Disclaimer: Free signup at https://www.filestack.com/ is required in order for each developer to have their own API key and track usage. The free version offers up to 1000 ‘transformations’ a month.> I have no affiliation with Filestack and do not stand to gain from users signing up. I was going to post as a sample app but I don’t want the usage counting against the limit on my free account.# www.filestack.com
Web-service that supports file editing and conversion for photos, videos, auto files and office documents. The service uses URL parameters to ‘build a request’, and returns the edited file.
By adding columns for Rotation/Crop/Size/Etc, you can build a custom request and return the new image:
Filestack URL Parameters:
The URL for the request is built by combining your API KEY with the URL of the image you want to edit, and the TASKS you want to perform:
https://cdn.filestackcontent.com
/YOUR APIKEY
/TASKS
/URL
URL
For images already stored in your app, you will need a public URL or secure/signed link to the image. This is a big topic, and is already covered in the forums.
Showing Images in Google Sheets
Public vs Secure URLs
TASKS
To build the /TASKS part of the request, add columns for Rotation/Crop/Resize/Ect to the table containing the images, so you can combine the selected Tasks into the final URL.
Then CONCATENATE()
all the values together into the final URL and save that path back to your sheet.
“https://cdn.filestackcontent.com/[YOUR_API_KEY]/”&> IF(OR(ISBLANK([Rotation]),[Rotation]=0),“”,“rotate=deg:”&[Rotation])&> IF(ISNOTBLANK([Rotation]),“/”,“”)&> > IF(ISBLANK([CropXY]),“”,“crop=dim:[”&[CropXY]&“,”&[CropHW]&“]/”)&> > ENCODEURL([Image])# NOTE: The new URL will point to an edited version of the image that is stored on Filestack servers.