Jump to content

.London Domains - £4

Responsive design with image height and width?

Best Answer DigitalSquid , 05 March 2018 - 08:51

Go to the full post

  • Please log in to reply
1 reply to this topic

#1 GazCBG

  • Member
  • Newbie
  • 1 posts

Posted 04 March 2018 - 21:59



I am create a site, using a responsive template and after checking it on GTMetrix, it tells me images are missing height and width info.

Can I add the full image size ok, without messing up the Responsive side of things? Or would I best, to not add them?



  • 0

#2 DigitalSquid

  • Overlord
  • Squidministrator
  • 1,050 posts

Posted 05 March 2018 - 08:51   Best Answer

Yes, you can add the height and width attributes to an image and then override them with CSS to make it responsive.


If you're not already then you may want to look into using picture or srcset to ensure that you're serving the best image for the current display/resolution. Here's an article that explains how and why to do it:

  • 1

More than happy to help for free but if you want to show some love back, either give me an up-vote or buy me a beer!


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users