Home Plugins responsify wp
Responsify WP logo

Responsify WP

by stefanledin on WordPress.org

Responsive images. Plug and play.

(18)
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.

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.

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.
  • Supports high resolution images (retina).
  • Custom media queries.
  • Handpick which image sizes to use.
  • Responsive background images.

Demo

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')
    )
) );
foreach( $posts as $post ) {
    // ...
}

// 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.

Functions

RWP provides a number of functions that can generate responsive images in your templates.
Let’s say that you have the following markup for a very large header image:

As you probably know, the_post_thumbnail() will create a regular tag with 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 rwp_img( $thumbnail_id ); // Generate a element echo rwp_picture( $thumbnail_id ); ?>

Website

http://responsifywp.com.

Demo

http://responsifywp.com/demo.

Documentation and examples

https://github.com/stefanledin/responsify-wp.

Requirements

  • PHP 5.3
Active installations800+
Weekly downloads
33+0.00%
Version1.9.11
Last updated6/7/2018
WordPress version3.8.1
Tested up to4.9.26
Tags
picturepicture elementresponsive imagessizessrcset