Make an image responsive – the simplest way [duplicate]

You can try doing

<p>
  <a href="https://stackoverflow.com/questions/15458650/MY WEBSITE LINK" target="_blank">
    <img src="https://stackoverflow.com/questions/15458650/IMAGE LINK" style="width:100%;" border="0" alt="Null">
  </a>
</p>

This should scale your image if in a fluid layout.

For responsive (meaning your layout reacts to the size of the window) you can add a class to the image and use @media queries in CSS to change the width of the image.

Note that changing the height of the image will mess with the ratio.

Leave a Comment