Cloudinary Blog

A Chaotic Good Guide to Image Performance, Part 1

By Mat Marquis
A Guide to Image Optimization for Website Performance

I’ve spent a lot of time thinking about the rules of putting images on the web.

For such a flexible medium as the web, software development can feel like a painstaking, rules-oriented game—an errant comma might break a build, a missing semicolon might wipe out an entire page. For a long time, the laws of image rendering seemed similarly cut-and-dry: For example, if your markups contained an img element , the singular content of its src attribute would be foisted on the audience regardless of their browsing context, period.

Likewise, I’ve been mulling long and hard over the seemingly carved-in-stone rules of the web standards-process. I had to, thanks to my role as chairman of the Responsive Issues Community Group, the private radio web-standards body that brought you the picture element and srcset and sizes attributes. After all, we had to know all the rules to, well, find creative ways to work around bureaucratic constraints. For one thing, we weren’t allowed to publish a spec in the first place. We certainly weren’t allowed to change the HTML spec itself though we ended up doing that nonetheless.

We were, I’m proud to say, a chaotic good web-standards group.

Note
A chaotic good character does what is necessary to bring about change for the better, disdains bureaucratic organizations that get in the way of social improvement, and places a high value on personal freedom, not only for oneself, but for others as well. — Alignment (Dungeons & Dragons), Wikipedia

The short version is that there’s the law—the process, the paperwork, the rules, the way we’re supposed to do things—and then there’s doing the right thing. In cases where the two align, all’s well with the world. If the law comes at the expense of doing the right thing, however, a chaotic good character or, say, a chaotic good web-standards group, would unhesitatingly deviate from the letter of the law.

We felt justified in this philosophy, considering “the closest thing web standards have to a golden rule":

Note
In case of conflict, consider users over authors over implementors over specifiers over theoretical purity.

  • Theoretical purity” at the bottom of the list is a warning against weighing what looks the most correct on paper over the realities of the way people build and experience the web.
  • Specifiers are those who are responsible for writing the standards.
  • Implementors are browser vendors who create the standards for use.
  • Authors are you and me—the web developers who decide how and when to use the new standards.
  • Users is a self-explanatory term: They’re the people who, for better or worse, must, day after day, live with the results of the new standards no matter how they were implemented and authored.

If you’re like me, you can see where the Responsive Issues Community Group (RICG) might’ve decided to play a little fast and loose with some of the day-to- day rules of web standards so as to better serve the Priority of Constituencies. The PoC is an inversion of the web-standards power structure—a reminder that those with the most control over how web standards are written, implemented, and used must always prioritize the wants and needs of those with less control. After all, web users pay the costs of the decisions made by the standards process, implementors, and authors alike, and we authors form the users’ first line of defense.

I say “costs” with good reason, especially with respect to image transfers. The median webpage’s total transfer size is huge: 1.7 MB as of May 2018. Images alone account for roughly half of that. According to Pew Research Center, one in five Americans owns a smartphone but without a home-broadband connection, up from 13 percent in 2015 and eight percent in 2013. A full 31 percent of adults making less than $30,000 a year have access to a smartphone but no broadband connections at home, up from 20 percent in 2015. They go online by way of connections with metered limits and overage charges. Even those fortunate enough to have an “unlimited” mobile data plan still have their connection speed throttled beyond a certain cap.

It would be easy, but not realistic, to say “just get rid of some images” to better serve users. I know all too well that you and I are often stuck working within constraints we can’t control: a “final, approved design,” a “business requirement,” or someone very important feeling very strongly that we post images a certain way despite our protests. In real-world development, rules abound.

So, in the spirit of the RICG, let’s be a little “chaotic good” about some of the image performance problems we face in everyday development work. Specifically, let’s be a little creative in interpreting the constraints with images—and maybe bend the rules a little—in favor of the audience. With a little sleight of hand, nobody will be any wiser.

Stay tuned for part 2 for the details.

Recent Blog Posts

The Visual Media Report: Visual Engagement and User Experience

With privacy top of mind, we wondered what we might learn from analyzing the large volume of data. What user behaviors would we discover, what regional differences might exist? What insights or early hints from different industries could we extrapolate? These questions guided us as we analyzed millions of anonymous end-user experiences and asset interactions across our platform.

Read more
How a Cloud-native DAM Platform Optimizes Customer Experiences

In today’s digital age, brands rely heavily on rich media to tell stories, foster engagement, and make emotional connections that drive results. Marketers use videos and images, tuned to customers’ interests, to create dynamic visual experiences. Digital campaigns about trips to Florida, for instance, have separate plot lines, depending on audiences’ passions for golf, deep sea fishing, or kid-friendly versus romantic getaways. Marketers expect to detect preferences, produce personalized experiences highlighting different desires, and turn digital prospects into vacationing customers. The ultimate success of a marketing campaign relies on the consistent delivery of these customer experiences, at scale.

Read more
Cloudinary’s Media Developer Experts Program

Cloudinary was founded by developers and developer-centric thinking is in our DNA. Our work with developers helps them better understand all things rich-media management and delivery is crucial to us. Now, in an effort to recognize, support, and reward the innovative leaders in that technical community, we’re excited to introduce a new Media Developer Experts (MDE) program! MDEs will leverage the Cloudinary platform to foster a community of media-management professionals; receive training and certifications to become experts within their field or audience; advance the state of media management, adoption, and best practices; and make the web more accessible.

Read more
An Eye-Opening Talk: Building Apps for the Next Billion Users in Africa

William (iChuloo) Imoh, who hails from Lagos, Nigeria, recently embarked on a U.S. speaking tour, February 20-March 12, during which he powwowed with technical and product teams and communities at such renowned enterprises as Netlify, Pluralsight, Lucidchart, Twilio, and more in Salt Lake City, Dallas, Las Vegas, and San Francisco. On March 5, he gave an enlightening talk, entitled International Developers and Development: Building for the Next Billion Users at Cloudinary in Santa Clara, California. Below is a synopsis. For details, see the related slides.

Read more
The Debut of the Cloudinary Customer Advisory Board

Focus on customers has always been Cloudinary’s mantra. Because we owe them our success, we are constantly reaching out to our customers, not just for feedback on our offerings, but also for their vision, wish list, and buy-in of what Cloudinary can do to meet their needs and make them succeed. About six months ago, it occurred to us that it would be beneficial if we could meet regularly with those who are behind innovation at our key customers—executives, product gurus, developers, content managers—to swap strategies, product roadmaps, best practices, and such. In particular, we’d like to solicit actionable feedback as a foundation for our plans of product enhancements.

Read more