Responsively adding webP images

Whilst working out an approach to selectively loading responsive images, I realised I had finally found a place for the webP format. A quick feature detect confirmed this would be possible. This post wraps everything up in the responsive images series by combining the feature detect with the responsive images code to provide a hearty complete solution to your responsive image needs.

If you view the page at http://opencomponents.com/flexible/ using the latest Opera or Chrome client, and inspect the images, you should notice that the image paths end in the .webp extension. This saves up to 50% download size on the larger images without any loss in quality.

On the smaller version of the images it was interesting to note that at default quality, the images were actually bigger. If I dropped the quality slightly, a more modest 20% gain was usually found. Must say though that the quality is still excellent.

Responsively adding webP images