WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by kylereicks v1.3.5

Picturefill.WP

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

Picturefill.WP

The facts

Rating
5★ from 7
Active installs
40+
Price
Free
Last updated
3 Aug 2014
Added
Apr 2013
Requires WP
3.2
Tested up to
WP 3.9.40
Downloads
9,855

Our analysis

AI-assisted

Picturefill.WP is a WordPress plugin that serves HDPI and responsive images by replacing images in post and page content with a special syntax. It uses an adapted version of Picturefill.js to load the appropriate image based on the browser's width.

The plugin is simple and does not offer options, but it requires some considerations regarding loading times, especially on image-heavy posts. It is suitable for users looking to implement responsive images without extensive configuration.

Best for: This plugin suits WordPress users who want to implement responsive images easily on their sites.

What it does well

  • Serves HDPI and responsive images
  • Uses a special syntax for image replacement
  • Suppresses errors and warnings in parsing the DOM

Where it falls short

  • Slow loading on activation due to image processing
  • May produce 500 or 504 server errors during initial load
  • Requires setting default image sizes for effective use

Verdict

Picturefill.WP offers a straightforward solution for responsive images, but users should be aware of potential loading issues and server errors during initial use.

From the developer

kylereicks's own description of Picturefill.WP, lightly tidied.

Note: This is an implementation of Picturefill.js version 1.2.x. For an implementation of Picturefill.js 2.x, see the master branch of the GitHub repository.

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

This plugin parses post and page content replacing images with a special syntax similar to the proposed syntax for the HTML5 picture element, then uses an adapted version of picturefill.js to load the appropriate image to the browser.

Considerations before installing

Slow Loading on Activation

The first time a page or post is loaded after activating Picturefill.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.

If you are installing Picturefill.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

As of version 1.3.3 Picturefill.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.
  }
}

Read the full description on the official page →

Tagged as