CMS-General

How do I disable automatic image resizing?

Last updated: October 17, 2018

Applies to:

Marketing Hub
marketing-basic-pro-enterprise
Basic, Professional, Enterprise
HubSpot CMS

Automatic image resizing is a feature enabled by default in HubSpot to optimize images based on the size of the display screen. This is used to optimize images, decrease browser load-time, and increase Google PageSpeed score.

With automatic image resizing, HubSpot looks for height and width attributes on the <img> tags in the page's HTML. So if you're using custom HTML and the height and width attributes do not exist on the <img> tags in your HTML, your images won't be automatically resized. 

It's also possible to disable automatic image resizing on an individual image basis by adding the following query parameter to the image URL in the HTML code:

?noresize

For example, the following image will be resized on the page because the height and width attributes are set in the <img> tag in the HTML:

<img src="http://cdn2.hubspot.net/hub/211045/file-377800313-jpg/IMG_4134.jpg" height="500px" width="600px">

To disable automatic image resizing simply add the additional ?noresize parameter to the image url:

<img src="http://cdn2.hubspot.net/hub/211045/file-377800313-jpg/IMG_4134.jpg?noresize" height="500px" width="600px">

Was this article helpful?

If you still need help you can get answers from the , or to contact support.