=== Responsify WP === Contributors: stefanledin Tags: responsive images, picture, srcset, sizes, picture element, picture markup, picturefill, images, mobile, performance, responsive, retina, responsive background Requires at least: 3.8.1 Tested up to: 4.1 Stable tag: 1.7.3 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Responsive images. Plug and play. == Description == Responsify WP is the WordPress plugin that cares about responsive images. ### Features * Use ``img`` with srcset/sizes attributes. * ...or the ``picture`` element. * Works with or without [Picturefill](http://scottjehl.github.io/picturefill/). * Supports high resolution images (retina). * Custom media queries. * Handpick which image sizes to use. * Responsive background images. Responsify WP finds featured images and all images inside the content and makes them responsive. For example, you might have a template that looks like this:

That will output something like this:

Hello world

Lorem ipsum dolor sit amet...

Image description
But once you have activated the plugin, it will look like this instead:

Hello world

Lorem ipsum dolor sit amet...

Image description
You can also choose to use the ``picture`` element instead:

Hello world

Lorem ipsum dolor sit amet...

Image description
It also works with high resolution (retina) images:

Hello world

Lorem ipsum dolor sit amet...

Image description
The different versions of the image in the examples above is in the standard ``thumbnail``, ``medium``, ``large`` and ``full`` sizes. The **media queries** are based on the width of the "previous" image. Any **custom sizes** of the image will also be found and used. ### Settings You can **select which image sizes** that the plugin should use from the RWP settings page. These settings can be overwritten from your templates. 'portfolio', 'rwp_settings' => array( 'sizes' => array('large', 'full') ) ) ); // Using WP_Query() $query = new WP_Query( array( 'category_name' => 'wordpress', 'rwp_settings' => array( 'sizes' => array('large', 'full') ) ) ); if ( $query->have_posts() ) { // ... } ?> **Available settings:** * Select which image sizes to use. * Set/override attributes. * Set custom media queries. * Turn on/off retina. * Ignore image formats. ### Picture::create( $type, $attachment_id, $settings ) In your templates, you can use the ``Picture::create()`` function to generate Picturefill markup. Let's say that you have the following markup for a very large header image:
As you probably know, ``the_post_thumbnail()`` will just create a regular ```` tag for the full-size image in this case. But you don't want to send a big 1440px image to a mobile device. This can easily be solved like this:
ID ); // Generate an tag with srcset/sizes attributes. echo Picture::create( 'img', $thumbnail_id ); // Generate a element echo Picture::create( 'element', $thumbnail_id ); ?>
### Website [http://responsifywp.com](http://responsifywp.com). ### Demo [http://responsifywp.com/demo](http://responsifywp.com/demo). ### Documentation and examples [https://github.com/stefanledin/responsify-wp](https://github.com/stefanledin/responsify-wp). ### Requirements * PHP 5.3 == Installation == = Using The WordPress Dashboard = 1. Navigate to the 'Add New' in the plugins dashboard 2. Search for 'Responsify WP' 3. Click 'Install Now' 4. Activate the plugin on the Plugin dashboard = Uploading in WordPress Dashboard = 1. Navigate to the 'Add New' in the plugins dashboard 2. Navigate to the 'Upload' area 3. Select `responsify-wp.zip` from your computer 4. Click 'Install Now' 5. Activate the plugin in the Plugin dashboard = Using FTP = 1. Download `responsify-wp.zip` 2. Extract the `responsify-wp` directory to your computer 3. Upload the `responsify-wp` directory to the `/wp-content/plugins/` directory 4. Activate the plugin in the Plugin dashboard == Screenshots == 1. Select which filters that RWP should be applied on. Thumbnails (post_thumbnail_html) and content (the_content) is used by default.You can also select which markup pattern RWP should generate. 2. You can also select which image sizes RWP should use, select if RWP should use retina images, ignore image formats and if Picturefill should be used or not. 3. You can also use the Picture::create( 'style' ) function to generate CSS and media queries for large background images. 4. A