sdgwuw
Last Updated: February 25, 2016
·
846
· elia
772edab580e030e41f9615f1d69ca95d

Faster browser rendering

To improve the browser rendering time add width and height attributes to your <img> tags. This way the browser doesn't have to wait for the image download to know its dimensions and can start immediately to layout the page.

Reference: https://developers.google.com/speed/docs/best-practices/rendering#SpecifyImageDimensions

If you're on Rails you can use the dimensions-rails gem that adds those dimensions for you!

Just put it in your Gemfile and enjoy!

Say Thanks
Respond