Responsive design is taking the world by a storm and every team is converting their site to be on mobile or preparing to do that soon.
Few people however realize performance implications of this new approach to web development and one of the issues is images which represent more then 60% of all network payload and can congest wireless networks with data unnecessary for display on naturally smaller screens than desktop.
This issue gave birth to various Responsive Images techniques which are used to display “just right” size of the image for user’s device. There are several aspects of the issue that need to be considered, from formats and resolutions to content management and implementation code. When done wrong, performance can degrade much worse then original “desktop” approach, but with a few key features implemented right, can reduce payload size dramatically providing improved user experience.
9. Encoding: Best Format
JPEG
WebP
Chrome23+
Opera 12.1+
JPEG XR
IE10+
PNG
Gif -> PNG
PNG -> JPEG
SVG
Web Site Optimization With Browser-Specific
Image Formats calendar.perfplanet.com
10. Bandwidth
Vary compression level
Requires bandwidth detection
Just plain hard
Alternative: use progressive JPEG
Progressive JPEGs FTW!
by @PatMeenan
13. <picture>, srcset, sizes
Now part of HTML spec
In upcoming Chrome, Firefox and Opera, "under
consideration" in IE
14. On The Page
<?php img('/path/to/original.jpg') ?>
Picturefill v2 by Scott Jehl
https://github.com/scottjehl/picturefill
8 Guidelines and 1 Rule for Responsive Images
http://blog.cloudfour.com/8-guidelines-and-1-rule-for-responsive-images/