# function to resize images not working as expected

**URL:** <https://community.hubspot.com/t/function-to-resize-images-not-working-as-expected/16921>\
**Category:** CMS Development\
**Tags:** content\
**Created:** [October 25, 2019, 4:06pm UTC](https://community.hubspot.com/t/function-to-resize-images-not-working-as-expected/16921 "2019-10-25T16:06:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 25, 2019, 4:06pm UTC](https://community.hubspot.com/t/function-to-resize-images-not-working-as-expected/16921/1 "2019-10-25T16:06:48Z")

</div>

Trying to tap into the resize image feature for our blog feed to serve up a better image size for performance: [HubL functions - HubSpot docs](https://designers.hubspot.com/en/docs/hubl/hubl-supported-functions#resize-image-url)

Currently using this approach:

`<img src="{{ resize_image_url(content.post_list_summary_featured_image, 740 ) }}" width="740" class="post-listing img">`

the returned src images are full size though - anyone happen to have any ideas on how to remedy?

---

<div class="post-metadata">

**Author:** ![kestrada](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kestrada/32/26684_2.png) [@kestrada](https://community.hubspot.com/u/kestrada)\
**Post date:** [November 8, 2019, 11:25pm UTC](https://community.hubspot.com/t/function-to-resize-images-not-working-as-expected/16921/2 "2019-11-08T23:25:10Z")

</div>

Hi @Anonymous,

Thanks for posting your question.

I found some ideas related to this and a great explanation related to the resize option, [here.](https://community.hubspot.com/t5/CMS-Development/Featured-image-sizes/td-p/26673)

I hope these ideas help you achieve your resized image.

Regards,

Kira

---

<div class="post-metadata">

**Author:** ![stefen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stefen/32/29274_2.png) [@stefen](https://community.hubspot.com/u/stefen)\
**Post date:** [November 15, 2019, 5:51pm UTC](https://community.hubspot.com/t/function-to-resize-images-not-working-as-expected/16921/3 "2019-11-15T17:51:38Z")

</div>

@Anonymous it looks like you’re using it correctly. You could try adding all 3 arguments to see if that helps. e.g.:

`<img src="{{ resize_image_url(content.post_list_summary_featured_image, 0, 0, 740 ) }}" width="740" class="post-listing img">`

I have noticed sometimes if the filename has a bunch of funky characters in it or if it’s an animated GIF, it will not resize the image. Hope that helps!

---

<div class="post-metadata">

**Author:** ![JBrake](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jbrake/32/76513_2.png) [@JBrake](https://community.hubspot.com/u/JBrake)\
**Post date:** [November 3, 2021, 3:51am UTC](https://community.hubspot.com/t/function-to-resize-images-not-working-as-expected/16921/4 "2021-11-03T03:51:07Z")

</div>

{{ resize\_image\_url(content.post\_list\_summary\_featured\_image, 0, 0, 740) }} should be correct.  
For a long time I didn’t think this function was working, but what I noticed one day is it can take a couple of minutes before the new sized image is available, in which case it will return the full sized image until then - so no broken images while that occurs.
