Tired of slow web pages? So is Google, and the company thinks it has the key to speed up the web: smaller image files. Google’s WebP image format aims to replace existing image file formats like JPEG with a smaller file size, resulting in faster load times and significant bandwidth savings for website operators. But will the company be able to convince everyone to switch, or are we about to see even more media format fragmentation?
WebP offers around a third better image compression than JPEG, which can add up to a lot of bandwidth savings and speed improvements, depending on how image-heavy a page is. YouTube was able to cut down page load times by up to 10 percent when it recently started rolling out WebP video thumbnails. Google has also saved several several terabytes of bandwidth every day since switching images in the Chrome Web Store to WebP, and reduced the site’s average page load time by nearly one-third. And when Google switched to WebP within its Google+ mobile apps, it saved 50 Terabytes of data every day.
Google isn’t the only company supporting WebP. Netflix has begun to use the format within its new TV UI to load thumbnails more quickly. Facebook is using WebP to serve images within its mobile apps, and companies ranging from Tinder to Ebay are experimenting with WebP as well.
It all began with video
The development of WebP was a bit of an accident for Google. The web giant was working on a video format called WebM, which is based on its VP8 video codec. Of course, videos are really just a series of pictures, and while working on VP8, Google engineers realized that the format was really good at compressing key frames, which are basically the pictures at the beginning of a new scene or sequence.
One of the things that makes WebP interesting is that it combines features that were previously unique to competing image file formats. JPEG is good at compressing photos and other detail-rich images. GIFs can be animated, and PNGs can be transparent, and contain millions of colors. WebP can handle all of this, and a combination thereof. “You can have transparency in lossy images,” said Google’s WebP Product Manager Husain Bengali during an interview this week, adding: “You can get all of this in one format.”
Google first announced WebP in 2010, and has since integrated it into both its own Chrome browser as well as Android, and released libraries that allow developers to add the format to their iOS apps. WebP has since also been adopted by Opera, and a there are a number of workarounds to bring it to other browsers. Altogether, up to 46 percent of all browsers in use support WebP, according to browser stats from Caniuse.com.
About those other 54 percent…
Of course, that leaves out 54 percent of all users. Firefox, Internet Explorer and Safari don’t natively support WebP, and it’s unlikely that the makers of these browsers are going to change their mind anytime soon. That’s because like so often, everyone has their own vision of how the future is going to look like.
Microsoft is pushing for its own format, dubbed JPEG XR, to replace traditional JPEGs, and Apple has long steered clear of Google’s media formats. The most logical ally for Google would be Mozilla, which has traditionally been a proponent of open media formats. However, while the Firefox community has had a spirited debate about WebP, the foundation has remained sceptical of Google’s efforts. Here’s a statement sent to me by a Mozilla spokesperson:
“WebP offers certain compelling features that JPEG does not, most notably an alpha channel, but compression efficiency is most important to us. We’re not yet convinced that WebP’s compression improvements or its feature set are strong enough to warrant the widespread introduction of a new image format on the Web, which will introduce fragmentation and compatibility issues during a lengthy transition period. We will continue to consider WebP and image formats in general, as we believe there is much room for improvement with images on the Web.”
Mozilla instead opted to stick with JPEG, but make it more efficient. The foundation announced a few days ago that it is developing an optimized image encoder dubbed mozjpeg that is capable of shaving off around five percent of an image’s size on average, according to Mozilla CTO Andreas Gal. These efforts are being supported by Facebook, which is testing mozjpeg, and funding the development of the next generation of the encoder with a $60,000 donation.
It’s true, there are some issues
It’s worth noting that Facebook isn’t firmly coming down on either side of this debate; the company is just interested in improving page load times, and saving a few bucks on bandwidth in the process. To do so, it actually started to use WebP for some of the images on users’ Facebook pages earlier this year.
However, the company quickly discovered that people aren’t just looking at their friends’ photos on Facebook, but instead also download them to share via email and possibly even print. And that’s when things got weird for some Facebook members, who simply didn’t know what to do when their usual apps refused to open files with a .webp extension. Facebook reverted to serving JPEG files again, and Google quickly responded by making Chrome the default viewer for WebP on its users’ computers. But the anecdote shows one reason why a transition to a new format can be tricky.
Another issue is increased load on servers. Encoding WebP takes more compute power than encoding a JPEG file of the same quality. Bengali told me that his team has been working on making encoding more efficient with a recent release, but he also admitted that the higher complexity of WebP will always mean that it needs more resources for encoding. But that’s a trade-off worth making in order to speed up page loads and save on bandwidth, he argued. “In the long term, bandwidth savings will be more important,” said Bengali.
How bad is fragmentation, really?
So what will be the next image format to rule the web? Will it be WebP, JPEG XR or even just plain-old JPEG, possibly with slightly improved encoders? “That’s the big question that all of us would like to have an answer to,” Bengali said during our conversation. He admitted that WebP may not win all measurement tests, but insisted that it is a good combination of features and bandwidth savings. And it has the sheer force of Google, and Chrome, behind it.
But without Internet Explorer, Firefox and Safari, this momentum only goes that far, and fragmentation seems inevitable. Which begs the question: How bad would it be if there was an image format supported by only half of the world’s browsers? End users wouldn’t necessarily notice, save for faster page load times, as their browser or app would simply display the images as before. Website owners on the other hand would have to figure out how to generate and serve different versions of the same image to different users, which could add some complexity, and mirrors what’s been happening in the video space, where different devices and browsers have long forced companies to encode files in multiple versions.
The good news is that some of this complexity could be shouldered by Akamai and other content delivery networks, which have started to offer sites on-the-fly image conversion to WebP, resulting in faster-loading web pages for end users.
And in the mobile app world, WebP is increasingly becoming a safe bet because it is supported by Android, and iOS developers can elect to include the necessary libraries to decode WebP pictures in their apps. And even the mobile web is starting to get faster, thanks to WebP. That’s because the mobile version of both Opera and Chrome offer users ways to speed up their web surfing by transcoding sites in the cloud to make them more mobile-friendly. Part of that process is a conversion of images from JPEG to WebP, which combined with other mobile optimizations, helps Chrome to reduce mobile data use by up to 50 percent.
So even if WebP doesn’t completely replace JPEG or any other image format any time soon, it will likely become part of many companies’ efforts to speed up the web. In the best case scenario, site operators will be able to relegate the heavy lifting to middlemen like Akamai, and users won’t notice anything at all, save for faster loading websites and more fluid app experiences. “It kind of is a win for everyone,” said Bengali.