WordPress’ Efficiency Crew has printed a feature proposal that will allow WebP photographs by default, increasing core assist for the trendy picture format.
In July, 2021, WordPress 5.8 introduced WebP support, permitting customers to add and use WebP photographs of their content material. If the proposal is accepted, model 6.0 will generate WebP photographs by default for brand spanking new JPEG uploads and can use WebP photographs by default for web site content material.
“WebP was developed as a contemporary picture format that gives superior compression on the net,” WordPress core contributor Adam Silverstein mentioned within the characteristic proposal. “Photos are sometimes a number of the largest sources utilized by web sites, and utilizing WebP creates web sites which can be lighter and quicker. In comparison with JPEG photographs, WebP photographs generated by WordPress are virtually at all times smaller, with a ~30% file size reduction on common (with the identical visible high quality).”
With WebP enabled by default, WordPress customers wouldn’t expertise any adjustments to their normal picture add workflow. WordPress would mechanically convert JPEG uploads to WebP within the background and use them on the web site.
Based on Can I Use, the WebP picture format is supported by 94.25% of net browsers. A really small variety of browsers, reminiscent of Web Explorer 11 or Safari on MacOS < v11 Massive Sur, don’t assist WebP.
The proposed characteristic would ship with two filters to regulate or disable WebP uploads, and a user-friendly plugin can be created to do the identical.
Regardless of the numerous efficiency advantages, assist for the characteristic proposal just isn’t unopposed. A number of contributors taking part within the dialogue expressed considerations about electronic mail shoppers and social media platforms not supporting WebP.
“I really feel like WebP just isn’t but able to turn out to be a ‘hardcoded default’ within the
post_content as a consequence of all the explanations talked about within the earlier feedback,” Kaspars Dambis mentioned. “Many net shoppers (which aren’t simply browsers) don’t assist WebP codecs — RSS shoppers, electronic mail shoppers, good TVs, e book readers, open graph parsers, desktop picture viewers, and many others. These are all essential customers of the online.”
Silverstein answered these considerations, confirming that WordPress will proceed producing the JPEG picture sub sizes because it at all times has.
“One essential observe about what this characteristic doesn’t change: JPEG sub sizes are nonetheless generated and saved in the identical meta fields,” he mentioned. “For that cause, customers of RSS feeds or REST media endpoints or OG tags for instance will proceed to make use of the JPEG sub sized variations.”
The Efficiency Crew contributors are concentrating on WordPress 6.0 for enabling WebP by default and are in search of approval from maintainers of the picture part. Anybody is welcome to check the characteristic by putting in the Performance Lab plugin with the “WebP Uploads” module activated. Testers are inspired to go away suggestions on the Trac ticket or Pull Request.