# Have the default "Image" module add height and width attributes to its HTML

**URL:** <https://community.hubspot.com/t/have-the-default-image-module-add-height-and-width-attributes-to-its-html/58301>\
**Category:** HubSpot Ideas\
**Tags:** design-manager\
**Created:** [June 3, 2022, 9:44am UTC](https://community.hubspot.com/t/have-the-default-image-module-add-height-and-width-attributes-to-its-html/58301 "2022-06-03T09:44:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jere/32/59606_2.png) [@Jere](https://community.hubspot.com/u/Jere)\
**Post date:** [June 3, 2022, 9:44am UTC](https://community.hubspot.com/t/have-the-default-image-module-add-height-and-width-attributes-to-its-html/58301/1 "2022-06-03T09:44:27Z")

</div>

**Problem** : the default “Image” module does not add height and width attributes to its HTML when used with the option “Size: Automatically adjust”.

**Why it’s benefitical** :

- The automatic image resizing by HubSpot requires the height and width attributes to img element (read here: [Automatic image resizing on HubSpot content](https://knowledge.hubspot.com/files/automatic-image-resizing-on-hubspot-content)). The resizing enables showing correct image size on each device screen size, thus serving more optimized images for smaller screens.
- There can be less layout shift when the sizes are mentioned.
- Better for SEO as Lighthouse sees the width and height attribute as a small factor for speed score.

**Who is this for**? This does not affect the content editors or developers, but it does affect the visitors visiting a website that has been created with HubSpot. With the optimized images, the site will load faster and save them bandwith.

 ![firefox_2022-05-26_17-18-37.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/b/5bcdd5b3ff92e4b37adaccab697090e4181210f4.png)

Discussion about this issue: [https://community.hubspot.com/t5/CMS-Development/The-default-quot-Image-quot-module-doesn-t-add-height-and-width/m-p/643537](https://community.hubspot.com/t5/CMS-Development/The-default-quot-Image-quot-module-doesn-t-add-height-and-width/m-p/643537)

---

<div class="post-metadata">

**Author:** ![GLimare](https://avatars.discourse-cdn.com/v4/letter/g/91b2a8/32.png) [@GLimare](https://community.hubspot.com/u/GLimare)\
**Post date:** [March 26, 2023, 11:14am UTC](https://community.hubspot.com/t/have-the-default-image-module-add-height-and-width-attributes-to-its-html/58301/2 "2023-03-26T11:14:33Z")

</div>

Hello,

It would be great to have it indeed, it’s a must-have in terms of website performance (increases Pagespeed score by reducing CLS).

Thank you.
