Resize Images Hubl Function does not work as expected

Hi, I have searched and searched and the only smiliar result I found was this one: https://community.hubspot.com/t5/CMS-Development/resize-image-url-function-not-resizing/m-p/267789

I am trying to use the HubL functions - HubSpot docs

But it does not work:

{{ resize_image_url("http://your.hubspot.site/hubfs/img.jpg", 0, 0, 300) }}

it says that it is going to render like this:

http://your.hubspot.site/hubfs/img.jpg?length=300&name=img.jpg

I wanted to use a Srcset responsive image but this tag only works in the image tag in the src parameters. Is this correct?

Hey @igcorreia

Checkout this article on how to implement the srcset.

The author code below illustrates it rather well IMO:

<img srcset="{{ resize_image_url(image.src, image.width) }} 1x,
 {{ resize_image_url(image.src, image.width * 2) }} 2x, 
 {{ resize_image_url(image.src, image.width * 3) }} 3x">

When working with the article above and the link you provided you’ll want to pay attention to the parameters you set when it comes to the dimensions and how they’re are being used.