Responsive Images to be merged into WordPress 4.4
Edit: Wordpress 4.4 is here! Update your WordPress installation to experience Responsive Images on your site.
What are Responsive Images?
If you’ve somehow missed all the excitement about browsers supporting responsive images you can read about it here. In short it is an HTML5 specification that allows the browser to determine which sized image to serve depending on the size of the viewport.
What does this have to do with WordPress?
For anyone who has created or worked with WordPress themes, especially those created for a client, images are a difficult to say the least. Great progress has been made in recent versions to make the Media Library much more intuitive and easy to use, but the fact remains that most end-users are not particularly image-savvy. Responsive images are part of the solution to this problem and others, including Retina images for devices with higher pixel density.
Can I use responsive Images in WordPress now?
Since you’re asking, I invite you to read this article I wrote on Responsive Images in WordPress with the RICG plugin. This is the plugin created by several well-known front-end and WordPress Core developers and will allow anyone to use with responsive images safely in a production site.
Why Should this be a part of WordPress core?
Although the RICG plugin works very well it inserts markup into the text-editor and requires a fair amount of work to integrate into a theme. Many core features are first developed as plugins following the Features as Plugins model, and this one is no exception. In my humble opinion support or these new attributes srcset
and sizes
is necessary for WordPress to remain a useful platform for modern websites. Overly-large images (sometimes even enormous ones) are often the culprits when it comes to slow-loading sites and give WordPress itself a bad name when they cannot be easily accommodated in a theme. As it happens a merge proposal was submitted and “blessed” to do this very thing. If all goes according to plan Responsive images should be merged in to WordPress 4.4.
This is great! What can I do to ensure this happens?
Again, I’m glad you asked. The merge proposal will be based on feedback to the RICG plugin so please give it a whirl and don’t hesitate to leave feedback on the Github repo or in #feature-respimg on Slack.
UPDATE: You can also test out WordPress 4.4 Beta 2 by installing the WordPress Beta Tester Plugin on a local development site.