• [Wébinaire 13 novembre 2025] Comment l’IA optimise la performance marketing in HubSpot ?

    S'inscrire

CMS Development

SJaeger
Contributeur

disable image resize if height and width is given

Résolue

Hello,

 

have someone see the possibility to disable the auto resize hubspot function if the image height and width attribute is given?

because i need only a 270px image. if i give the right width and height attribute hubspot make automaticly a srcset instead of src attribute. same on picture tags, where i dont want srcset on img tags.

 

 

Nothing is impossible
0 Votes
1 Solution acceptée
piersg
Solution
Conseiller clé

disable image resize if height and width is given

Résolue

These both worked for me in preventing Hubspot from adding srcset and automatic resizing parameters:

 

<img src="{{ resize_image_url(item.image.src ~ '?noresize', 270, 0, 270) }}" {{sizeAttrs}}>
<img src="{{item.image.src}}?noresize" {{sizeAttrs}}>

 

 

For the record, I see you've written your img src as item.image.url but the parameter of the image tag in Hubspot you need is item.image.src

Voir la solution dans l'envoi d'origine

0 Votes
4 Réponses
piersg
Conseiller clé

disable image resize if height and width is given

Résolue

Hi @SJaeger (thanks @Jaycee_Lewis). Yes, this is possible. Just add ?noresize to the end of the image src e.g.

<img src="{{module.img.src}}?noresize" alt="{{module.img.alt}}" height="{{module.img.height}}" width="{{module.img.width}}">

 

SJaeger
Contributeur

disable image resize if height and width is given

Résolue

hello and thanks but still not working

<img class="img-fluid w-100" src="{{ resize_image_url(item.image.url ~ '?noresize', 270, 0, 270) }}" alt="{{ item.name|escape }}" {{ sizeAttrs }} loading="lazy">
{% require_head %}
<link rel="preload" as="image" href="{{ resize_image_url(item.image.url, 270, 0, 270) }}">
{% end_require_head %}
Nothing is impossible
0 Votes
piersg
Solution
Conseiller clé

disable image resize if height and width is given

Résolue

These both worked for me in preventing Hubspot from adding srcset and automatic resizing parameters:

 

<img src="{{ resize_image_url(item.image.src ~ '?noresize', 270, 0, 270) }}" {{sizeAttrs}}>
<img src="{{item.image.src}}?noresize" {{sizeAttrs}}>

 

 

For the record, I see you've written your img src as item.image.url but the parameter of the image tag in Hubspot you need is item.image.src

0 Votes
Jaycee_Lewis
Gestionnaire de communauté
Gestionnaire de communauté

disable image resize if height and width is given

Résolue

Hey, @SJaeger 👋 Thanks for the great question! @Oezcan and @piersg do you have any experience here with what @SJaeger is trying to accomplish?

 

Thank you! – Jaycee





loop


Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.

Learn More




0 Votes