Author Topic: WordPress is Going to Google's WebP Images by Default  (Read 319 times)

Brad

  • Inner Core
  • Hero Member
  • *
  • Posts: 3738
  • What, me worry?
    • View Profile
WordPress is Going to Google's WebP Images by Default
« on: August 02, 2022, 07:58:04 PM »
WordPress knows best.  All your images will be changed to WebP by default in the future.  Trust us.

https://wptavern.com/webp-by-default-merged-into-core-for-wordpress-6-1

Google's new WebP(oo) format.

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 8108
    • View Profile
Re: WordPress is Going to Google's WebP Images by Default
« Reply #1 on: August 04, 2022, 01:21:45 AM »
This is a good idea and I'm glad to see WP move forward with this. For most site owners and site visitors, this is an improvement.

The bandwidth savings can be substantial and it can result in a significant speed boost. For a given visual quality, a WebP image will generally be much smaller than a JPG, especially if you are trying for a high quality JPG. The other viable format for photos is AVIF, which is superior to WebP in the way WebP is superior to JPG other than max size (AVIF limited to 7,680 x 4,320 pixels) and browser support.

I've been serving up WebP images whenever possible for quite a while now. You can see significant improvements on GTMetrix and the like just by turning this on. In WordPress, this was formerly done with a plugin like Shortpixel (my prefered) or Smush or many others. All of those plugins are just API bridges to services that can be used for any site, not just one running on WordPress.

>>changed to WebP by default

That's not quite right. To get pedantic about it, I would say more precisely that in addition to all the sized JPG images that WordPress has always created when you upload an image, it will now also create sized WebP images to match.

Your JPG derivatives will still exist. They have to because browser support for WebP is not universal.

Your uploaded images will also be untouched, as always. The only exception to this is that with the default settings, WordPress will resize very large uploaded images, which is a good thing - clueless users love to eat up disk space by uploading 5000px wide images, so for sites with writers and editors who don't know about image sizing, that saves people from running out of disk space on their hosting plan.

Which brings us to the sticking point. The big debate in the WP community about WebP was not about whether or not it was a better format and would save bandwidth. That was clear.

The problem is that since some browsers still do not support WebP, WordPress can not "change" to WebP, but must add, WebP images. This means that effectively, it now creates twice as many image files and takes up almost twice as much storage. WordPress users with sites that have huge numbers of images rebelled. They were afraid that they would run out of disk space on cheap shared servers and such.

I maintain one site that has 9GB of images. We're already serving these as WebP so we already have the thumbnails, but imagine a site already at 9GB who is forced to turn on the WebP feature and finds they now have about 16GB of photos (rough guess, might be less).

The "premium" Wordpress hosts like WPEngine tend to be pretty parsimonious with their disk storage. At WPEngine, that particular scenario pushes you from the $30/mo plan to the $115/mo plan. At Kinsta it pushes you from $35 to $70.

Because of these concerns, the WP community had to create a way to turn off the WebP feature before rolling it into WP.

All in all, though, this is an excellent change and it opens the path for eventually adding other modern image formats like AVIF that could be turned on or off as users want.

So it is now on by default instead of the original proposal which was simply to have it on with no way to turn it off.

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 8108
    • View Profile
Re: WordPress is Going to Google's WebP Images by Default
« Reply #2 on: August 04, 2022, 01:24:18 AM »
Just checked. According to caniuse,

WebP - supported by 94% of users, 97% if you count partial support
AVIF is stuck at 71%
JPEG XR - < 1%
JPEG XL - 0%
JPEG 2000 - 18%
HEIF - 0%

So AVIF is conceivably an alternative to WebP, but 71% vs 97% is significant. If in a couple of year it reaches 97%, it could be added to WP or could replace WebP. Meanwhile, JPEG XL would be a good alternative too. It's 60% more efficient than JPEG, beats WebP and might bet AVIF, but with 0% support, there's no point adding support to a CMS.

Also, WebP does both lossy and lossless, so it is a drop-in replacement for both JPGs and PNGs. AVIF and JPEG XL only do lossy compression (I think... I should look that up to verify).

It also has alpha transparency like PNGs. I'm not sure about the other formats. That's fairly significant. I see a lot of sites (and have been involved with a few) that like to create header images with text over photos or transparent knockouts and various things like that which then have to saved as PNGs, making them huge.

The JPEG standard, meanwhile, is 30 years old. It literally predates the web. It is from another century ;-)

The other thing is that most people can get their images in JPG, even if they shoot in RAW. But most people do not have software to save images in modern formats, so it is a significant help to average users to do that conversion for them. They can always opt out.
« Last Edit: August 04, 2022, 01:39:23 AM by ergophobe »

Brad

  • Inner Core
  • Hero Member
  • *
  • Posts: 3738
  • What, me worry?
    • View Profile
Re: WordPress is Going to Google's WebP Images by Default
« Reply #3 on: August 04, 2022, 09:06:23 AM »
It makes sense for WordPress.com to do this by default especially on new accounts.

It all depends on the implementation for hosted Wordpress.  It needs to be opt-in with full disclosure for existing instances.  I'm paying the bills for hosting which lets me be in charge.  Therefore if I upload a .jpg I expect it to stay a .jpg unless I say otherwise. 

Torben

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 287
    • View Profile
Re: WordPress is Going to Google's WebP Images by Default
« Reply #4 on: August 05, 2022, 08:10:29 AM »
Safari is still lagging in WebP support (Safari is the new Internet Explorer :()

However, the next iOS and MacOS to be releases this fall will support AVIF: https://9to5mac.com/2022/07/15/apple-avif-image-safari-ios-16-macos-13/

Brad

  • Inner Core
  • Hero Member
  • *
  • Posts: 3738
  • What, me worry?
    • View Profile
Re: WordPress is Going to Google's WebP Images by Default
« Reply #5 on: August 05, 2022, 09:26:53 AM »
> Safari

Don't Google and Apple play this game off and on over the years? 

1.  Google rolls out a new "standard".
2.  Everybody, stumbles all over themselves to adopt it or worry about adopting it.
3.  Apple silently ignores it for another 3 - 5 years.
4.  X years down the road, Google gets bored with the new standard or found it backfired on them, and lets it waste away.

ergophobe

  • Inner Core
  • Hero Member
  • *
  • Posts: 8108
    • View Profile
Re: WordPress is Going to Google's WebP Images by Default
« Reply #6 on: August 05, 2022, 05:16:51 PM »
Brad, I know you want to make Google out to be a bad guy in all this, but not only did Google roll out WebP which is a huge improvement, but Chrome was also the first browser to adopt AVIF, which is probably the next gen after WebP. They are genuinely the first mover on making image bandwidth smaller on the web.

The second major browser to roll out AVIF support (not counting Opera) was Firefox.

Safari for iOS 16 has support for AVIF. The problem is almost 16% of the world is on an iOS version older than iOS 16. Edge adds up to another 4% of the browsers in use and they still don't have AVIF support.

So in terms of ditching WebP in favor of AVIF, Google is not the problem. They were the first ones to move on with AVIF support.

That said, there is still a place for WebP lossless compression, which neither JPEG or AVIF support.

To me, this is like Google updates to HTTP. They rolled out SPDY because progress on a replacement for HTTP was glacially slow and nobody was doing anything. That finally pushed people to get HTTP/2 out, at which point Google promptly ditched SPDY for the most part, as they should have since HTTP/2 is more comprehensive. But without the push from Google, I think it would have taken longer to move on from HTTP and we have all benefited from that.

Similarly, nobody was really making progress on an image format designed for the web. WebP started a push and now we have things like AVIF and JPEG XL and finally people are starting to replace JPEG. Once AVIF hits penetration levels similar to WebP, I hope CMSs like Wordpress will ditch WebP for AVIF. As web users, we all benefit from that process.

Of course, Google benefits as well. It makes their crawl easier. It makes pages load faster which means more page views which means more revenue. I'm not saying they are knights in shining armor, just that these changes are improving the web for all of us, even if the motivation is to protect Google revenue streams.

JPEG is a standard on a par with GIF. It has only hung on so long because of legacy software and because it is the default standard in low-end cameras. But just as moving from GIF to PNG much improved the web experience, moving from JPEG to modern image formats will improve it too.

« Last Edit: August 05, 2022, 05:31:00 PM by ergophobe »