Responsive Images in WordPress 4.4 – A personal story

WordPress is made by those who show up.

I’m not a super web developer. I don’t have any qualifications that would make someone ask me to help implement a new web technology on a quarter of the websites in the world. But nobody told me not to either, so here we are. Earlier today, WordPress 4.4 was released, including native support for responsive images. This is a brief account of how I accidentally became a lead developer of a new WordPress feature.

A few years back, a group of web developers noticed a problem. Web page sizes were getting larger—mainly so images would look good on new devices with fancy screens—making it harder for people to access websites on slower connections. The thing is, when you notice a problem, you have a few choices. You can either shrug and say, “I wish someone would fix that problem,” or you can roll up your sleeves and try to fix it yourself. Thankfully they chose the latter, and responsive images were born.

In early 2014, as I was learning about this cool new technology, I shared what I was learning at WordCamp St. Louis. Around the same time, I figured out how to submit a bug fix to WordPress and began making small contributions to the project. When I heard that the same group who helped to create responsive images were going to try bring those tools to WordPress, I decided to see if I could help.

Turns out, a guy named Tim Evko had created a WordPress plugin that automatically added responsive image support to WordPress and the group had decided to see if it could be used as a starting point for bringing responsive image support into WordPress by default. I installed the plugin to test it out and noticed a small bug. Since the plugin was being developed on GitHub, it was relatively easy for me to submit a bug fix (here is my first commit to the project), and I was immediately hooked when my code was accepted. Within a year, I had mounted up over 120 commits to the project and was writing blog posts on wordpress.org during the release cycle for WordPress 4.4.

I was extremely fortunate to get involved in a popular feature, because I didn’t need to do much selling to get it included in a release. There were several times where the amount of work looked overwhelming, but I decided I’d rather see the project fail because the lead WordPress developers voted it down, and not because I didn’t show up and do my part. Several talented people ended up getting involved to make this feature happen, and each time our small committed team didn’t have the expertise or bandwidth to move something forward, somebody from the community showed up and either pointed the way or contributed code to fix the issues we were having.

I’m extremely grateful to Tim and Jasper for being amazing teammates, for Mike and Andrew, who gave advice and/or completely rewrote sections of the code to make it perform better, and to Mat and the RICG for their support.

At WordCamp NYC 2014, Boone Gorges gave a great talk about the benefits you receive by contributing to WordPress. This has definitely been true in my experience. By working on this project, I’ve learned a ton about the internals of the WordPress image functions and benefitted from having my code reviewed from some of the best WP developers in the world.

This experience also reinforced my belief that a lot can be accomplished by simply asking what needs to be done and then giving yourself permission to work on a solution. There are many more ways to make the web (and the world) just a little bit cooler, and I’m looking forward to seeing how I can help.

Image credit: Mel Choyce


Comments

6 responses to “Responsive Images in WordPress 4.4 – A personal story”

  1. Way to go, Joe! Your story makes me want to get more involved. Thanks for sharing! Oh, and thanks for your hard work (and that of your team) in getting responsive images into WordPress! 🙂

  2. Inspiring! Thanks Joe!

  3. I need to add the ” 2x” to the url attribute srcset wordpress 4.4.2.

    maybe you can do so using a function?

    I leave a screenshot for you to understand me, and thank you very much for your article.

    capture>>(http://i.stack.imgur.com/jCdbE.png)

  4. Jan Rossi Avatar
    Jan Rossi

    I just love this new functionality.

    However, I’ve encountered something weird. According to this https://make.wordpress.org/core/2015/11/10/responsive-images-in-wordpress-4-4/ there’s a new default image size added, the medium_large. The thing is, if I change the default image sizes in the media settings page, WP stops generating the medium_large size when uploading an image. Changing the image sizes back to default, will not bring the medium_large back. I’ve tested this on WP 4.4.2 / 4.5, locally, online, fresh install, different themes, it’s the same result.

    Is this a bug, or am I missing something here?

    1. Hi Jan,

      If this is reproducible with no plugins and a default theme, it’s probably a bug worth submitting to https://core.trac.wordpress.org/.

      1. Jan Rossi Avatar
        Jan Rossi

        Done. https://core.trac.wordpress.org/ticket/36531

        Thank you so much for all the hard work on responsive images.