# Resize Images Hubl Function does not work as expected

**URL:** <https://community.hubspot.com/t/resize-images-hubl-function-does-not-work-as-expected/20744>\
**Category:** CMS Development\
**Created:** [May 11, 2020, 11:55am UTC](https://community.hubspot.com/t/resize-images-hubl-function-does-not-work-as-expected/20744 "2020-05-11T11:55:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![igcorreia](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/igcorreia/32/26131_2.png) [@igcorreia](https://community.hubspot.com/u/igcorreia)\
**Post date:** [May 11, 2020, 11:55am UTC](https://community.hubspot.com/t/resize-images-hubl-function-does-not-work-as-expected/20744/1 "2020-05-11T11:55:06Z")

</div>

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](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](https://designers.hubspot.com/docs/hubl/functions#resize-image-url)

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?

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [May 11, 2020, 5:24pm UTC](https://community.hubspot.com/t/resize-images-hubl-function-does-not-work-as-expected/20744/2 "2020-05-11T17:24:02Z")

</div>

Hey @igcorreia

[Checkout this article on how to implement the srcset](https://www.kelp.agency/blog/retina-images-on-hubspot).

The author code below illustrates it rather well IMO:

```auto
<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](https://www.kelp.agency/blog/retina-images-on-hubspot) and the[link you provided](https://designers.hubspot.com/docs/hubl/functions#resize-image-url) you’ll want to pay attention to the parameters you set when it comes to the dimensions and how they’re are being used.
