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!
Written by Elia Schito
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#