How to remove fixed image width?

Hi,

I would like to remove the fixed width property of images.

Example

<img src="//static.hubspot.com/final/img/content/email-template-images/placeholder_200x200.png" class="hs-image-widget " style="width:320px;border-width:0px;border:0px;" width="320" alt="" title="">

This is the standard output. As I want to override the width with an relative value like 100%, I don’t find any option to remove it. Is there a way to remove the fixed width?

@jobnomade,

Just use an important tag in your css:

img {
 width: 100% !important;
 height: auto !important;
}

Thank you so much for this - I’m new to HTML and so I would really appreciate it if you could advise on how I can apply your suggested code to my containers.

I have a row of 5 buttons, each with an image and link. The images are the correct size on a desktop screen but then are oversized on a mobile view so I need to remove the fixed size which is causing this. Please can you show me how I would apply your code to the following code (i have replaced the tile images and links for privacy):

<center><a href=“TILE-LINK”><img src=“TILE-IMAGE”></a><a href=" TILE-LINK “>< TILE-IMAGE “></a><a href=” TILE-LINK”><img src=" TILE-IMAGE “></a><a href=” TILE-LINK"><img src=" TILE-IMAGE “></a><a href=” TILE-LINK"><img src=" TILE-IMAGE "></a></center>

Hey, @JTPwellness You might want to create a new post for this one. You didn’t do anything wrong, and this post is almost 8 years old and may not get the visibility you want for your question. — Jaycee

@Jaycee_Lewis Thanks for the tip - I’ll start a new post now!