WordPress 5.8 adds WebP support

888u

Last update at :2024-05-16,Edit by888u

WebP is a modern image format that provides improved lossless and lossy compression for images on the web. WebP images are on average about 30% smaller than their JPEG or PNG equivalents, making websites faster and using less bandwidth. According to caniuse, all modern browsers support WebP.

Starting with WordPress version 5.8, you can upload and use WebP images in WordPress just like you use JPEG or PNG images today (as long as your hosting service supports WebP). Switching your images to WebP format will improve your website's performance and your website visitors' experience.

Because I remember that WebP was not supported when uploading images before. Today I found that I can directly upload WebP images. I will record it here.

WordPress supports WebP instructions

How WebP can help you

WebP images are significantly smaller than their JPEG equivalents, so visitors to your site will see the entire page load faster. Smaller images require less bandwidth to transfer, and your images still get all the responsiveness benefits of srcset and lazy loading by default. Finally, all major browsers support WebP, so most websites can start using them today.

Create WebP images

The image editing tool supports exporting in WebP, or you can use a command-line conversion tool or a web-based tool such as Squoosh. After saving your images as WebP, upload them to WordPress and use them like any other image.

Use WebP images

WebP images work like any other image in WordPress, with a few minor caveats.

WebP images support lossy and lossless compression, as well as animated formats and supports transparent images. In WordPress, the lossless WebP format is only supported if the hosting server uses Imagick (PHP library) until LibGD adds support. Additionally, animated and alpha formats are not yet supported for resized images (which create lossy images when uploaded in these formats).

WebP support in the media library requires that your web server's image processing library (WordPress supports Imagick and LibGD) supports the WebP format. Fortunately, these libraries have supported WebP for a long time, so support is widely available. If your web server does not support WebP, you will see an error message when trying to upload a WebP image.

If your audience includes a large number of users using unsupported browsers (such as IE11), avoid using WebP images, or queue the browser polyfill.

Plans for the future

The Media Components team is also exploring the option of letting WordPress perform image format conversion on uploaded images - using WebP as the default output format for small-sized images. You can track progress and test this feature on a track ticket. We're also keeping an eye on more modern formats like AVIF and JPEGXL, which will improve compression rates and further reduce the resources required for compression.

Reference: https://make.wordpress.org/core/2021/06/07/wordpress-5-8-adds-webp-support/

Recommended site search: server rental, cloud server rental, proxy IP address, vps server, website registration information, dynamic IP dialer, free personal website server, personal domain name registration, virtual host recommendation, server high defense Hong Kong,

p>

WordPress 5.8 adds WebP support

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码