A fundamental best practice in modern times is to optimize images to use proper sizing, quality and format.
I need to automate this process, meaning: files uploaded to Content Hub should be automatically converted to webp and resized to a maximum width/height.
How do I achieve this?
Thanks!
Hey @alvarofranz! Thanks for the post. I understand you want all images uploaded to HubSpot to be automatically optimized. I assume this is a step beyond the Automatic image resizing on HubSpot content that occurs by default, correct?
I want to invite some subject matter experts to see if they have any suggestions.
Hey @alyssamwilie, @RatulRahman, @Jnix284 do you have any best practices for automatic image optimization to these specs?
Best,
Kennedy
Hi @alvarofranz, I believe you would need to create a custom solution for this, most likely using some kind of image optimization API together with HubSpot’s Files API.
AFAIK, HubSpot doesn’t support such behaviour other than the Automatic image resizing that @kennedyp mentions.
You can also ask your team to use services such as TinyPNG before uploading files to HubSpot.
And if you are worried about heavy images appearing in your website, you can always use the resize_image_url function in your code.