This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

WP Srcset

Description

The new srcset attribute has recently dropped in Chrome and Firefox. It is the simplest way to get retina ready images on your site.

This plugin will automatically add the srcset attribute to your images if a suitable retina sized image can be found.

It also includes a JS polyfill – Picturefill – to ensure that this works on all browsers – not just those that support srcset. This is about 6.5kb, and can easily be dequeued if you only wish to support browsers that have implemented this functionality.

This plugin does not handle generation of the alternative images, and this should either be done manually or using another plugin. See installation instructions for more information.

This plugin requires PHP 5.3

Installation

There are 2 ways to use the plugin:

  1. You will either need to manually register image sizes for 2x versions of your images in your theme.
  2. Use an on the fly image generation solution such as WPThumb.

Example of how to register high resoloution versions of an image. add_image_size( ‘small’, ‘100’, ‘100’ ); add_image_size( ‘small-2x’, ‘200’, ‘200’ );

Contributors & Developers

“WP Srcset” is open source software. The following people have contributed to this plugin.

Translate “WP Srcset” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0 – Initial release. High res images for WordPress using srcset attribute and srcset-polyfill