WordPress plugin intelligence profile

Picturefill.WP

A Wordpress plugin to use picturefill.js to load responsive/retina images, mimicking the proposed HTML5 picture spec.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 3.9
Current version1.3.5
WordPress coverageTested up to WordPress 3.9
Minimum stackWP 3.2 · PHP —
Directory statusactive
Last directory update3 Aug 201412y ago
Active installations40Adoption metric — not a quality score
WordPress.org rating5.0 / 5 from 7 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Picturefill.WP version 1.3.5 as active, updated 12y ago and tested up to WordPress 3.9.

Overview

About this plugin

x. x, see the master branch of the GitHub repository.

WP is a simple and option-less plugin to serve HDPI and responsive images on a WordPress website.

js to load the appropriate image to the browser.

Considerations before installing

Slow Loading on Activation

WP, new @2x size images will need to be created for the images in the post or page content. This can take several seconds and will take longer on image heavy posts. Once these images are created, posts should load at least as fast or faster than they do without the plugin.

WP on a large and image heavy site, you may want to consider using another plugin like Regenerate Thumbnails to create the new image sizes for existing posts and pages.

500 or 504 server errors

These errors are related to the slow loading listed above. If the server reaches its timeout limit before it is finished processing new images, it will return a 500 or 504 error. Refreshing the page usually gives the server the time it needs to finish processing the images.

On some image-heavy posts, it may take more than one refresh.

Image Sizes

By default, WordPress creates as many as 3 images of different sizes for each uploaded image (“large”, “medium”, and “thumbnail”), in addition to the “full” image size.

This plugin adds responsive breakpoints based on the width of the image. The largest available image will display unless the browser width is less than the image width + 20px, in which case the next size down is displayed.

To use this plugin most effectively, set the default image sizes (“large”, “medium”, and “thumbnail”) to reflect useful breakpoints in your theme design.

Errors and Warnings

WP suppresses errors and warnings in parsing the DOM. Errors and warnings can now be collected via the picturefill_wp_syntax_present_libxml_errors and picturefill_wp_get_images_libxml_errors filters.

add_filter('picturefill_wp_get_images_libxml_errors', 'handle_errors');

function handle_errors($errors){ foreach($errors as $error){ // Handle errors here. } }

Theme CSS

js syntax uses nested span elements. WP. If possible, it is best to remove the offending code from your theme files, but adding the flowing to the bottom of your theme’s CSS file should also work to reset these styles.

span[data-picture]{display:inline;margin:0;padding:0;border:0;} span[data-picture] span{display:inline;margin:0;padding:0;border:0;}

Caching

WP uses transient caching. WP is updated. WP from the plugins menu.

WP. php file:

remove_filter('the_content', array(Picturefill_WP::get_instance(), 'apply_picturefill_wp_to_the_content'), 11); add_filter('the_content', array(Picturefill_WP::get_instance(), 'cache_picturefill_output'), 9999);

If you still encounter problems with other plugins or theme features, you may want to disable caching all together. WP” section of the GitHub repository.

Details

WP looks through the_content to find <img> elements like this:

jpg" width="770" height="577" />

then replaces them with something like this (visit the GitHub repository for a breakdown of the syntax):

jpg" width="770" height="577" /> </noscript> </span>

js then looks for the last data-src listed where the associated data-media matches the device and browser, and loads the appropriate image inside the matched <span> element.

Extending Picturefill.WP

WP subsection of the GitHub repository for a list of plugin hooks and examples.

Advanced Use

Markup Tricks

Limit Responsiveness

The responsiveness of an image can be limited by adding the class min-size-{image size}. For example, an image with the class min-size-medium will not load an image smaller than size medium.

Skip Images

To skip images and load them normally add the attribute data-picturefill-wp-ignore to the <img> tag.

Helper Functions

See the helper functions section of the documentation on GitHub.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • responsive images
  • retina images
  • picturefill
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 3.9

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 3.9.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to3.9
Minimum requirementsWordPress 3.2 · PHP not listed
Update activity3 Aug 201412y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.