Problem with resize_image_url function

New Contributor

Hello Community,

 

I have just discovered that Hubspot has a built-in feature for resizing Hubspot-hosted images on the fly, unfortunately I am not able to make it work.

 

In my template I have this code:

 

{{ resize_image_url(widget_data.landing_bg_img.src, 1440) }}

In the html code of the page I see that the url of the image is now different (it has a couple of query string appended):

https://resources.megadynegroup.com/hs-fs/hubfs/Americas/img/URETHANE%20COVER%20PHOTO%202017.jpg?width=1440&name=URETHANE%20COVER%20PHOTO%202017.jpg

However, by going to that url, the image returned by the server is the same as the original (4000 pixel instead of 1440).

 

Is this a known issue or am I doing something wrong?

 

Thank you in advance for any kind of support.

 

Damiano

 

 

Reply
0 Upvotes
2 Replies
Advisor

Hey @domino-dseno,

 

That image is resizing to my browser window, so it's hard to see if it isn't working as expected. Do you have a live page where you're seeing the wrong size? 

Reply
0 Upvotes
New Contributor

The resulting image is still 4608 pixel wide, instead of 1440 as I requested. You can have a look at the original size by using Chrome DevTools.

Reply
0 Upvotes