What is webp and how to use webp images in WordPress

Although the image is beautiful and expressive, it is one of the culprits of poor pages. Essence Incorrectly cutting, formatting, and non -compressed images may reduce your website page visitors and search rankings. Fortunately, there is a new (ISH) child here, which is a next -generation image format designed to solve the page speed crisis. In this article, we answered \”What is webp?\” This question. And provide you with new opinions on contemporary image file formats.

Images are usually one of the biggest reasons for the slow loading of web pages. They will not only slow down the loading time, but also occupy a lot of space and resources on the server. Select the file type carefully and compress them to help reduce the loading speed, but they can only be optimized before the image quality is damaged. Another choice is one of the optimized image file types:

Webp .

Webp is the next -generation image file format developed by Google. This file format actually existed since 2010, but it has not been widely used and is not widely known. In the following guidelines, we will discuss the next -generation image format webp and explain how and why they should use them on the WordPress website.

What is webp?

Webp is a grating image format from Google, which is designed for network. It provides non -destructive and damaged compression, allowing web designers to display richer images in smaller file size.

Webp Damaged Image Coding uses prediction coding. With this, it reduces the file size by looking at the adjacent pixel, and then only encodes the difference. Damaged images are 34%smaller than JPEG’s comparable images.

Webp non -destructive image uses the image fragment that has been seen to rebuild new pixels. If you can’t find the matching item, it can use the local palette. No damage image is 26%smaller than the same image as PNG. The lossless WebP supports Alpha channel (transparency), and its file size is 3 times smaller than PNG images.

What is a webp file?

Webp files use VP8 or VP8L image data, and container -based containers. It uses file extension .Webp.

libwebp

Library is a reference implementation of webp specifications. You can view the library in the GIT repository or view the library in the form of tarball.

The main advantage of webp

The main advantage of the webp is

file volume Small

. In this way, your webpage will be loaded faster and you will use less server resources. This also means that if your visitors use their browsers to support them, you will be able to use more color with more colors without increasing the current load of the server.

New freedom to use images and graphics will also help your web design . No need to worry about each pixel and KB, you don’t have to use a smaller area for images in the layout. You can use the size suitable for design without having to make the design suitable for smaller images because of the page speed or loading time.

How to add webp images to WordPress Although webp images have powerful functions, they are not easy to add to WordPress media libraries. On the one hand, not all browsers support the webp format, and need backup images to achieve backward browser compatibility

]

WordPress 不支持的 WebP 图像

WordPress itself does not support WebP images, but there is a solution

It also requires additional security steps to prevent WordPress from allowing users to allow users to default Upload a webp image. These security issues are different from SVG files. Webp files only need a solution process before adding to the media library. Once they are correct, they can be uploaded to the WordPress website.

There are several ways to add WebP images to WordPress. You can choose:

  1. Manual route (this requires a little elbow oil, but not too complicated), or

  2. Use the plug -in.

If you are interested in fast repair, you can use one of the following plug -ins, instead of meting manual routes.

Manually adds webp images to wordpress

First, you need to ensure that the image format is correct. You need to convert them to webp.

Then, you needThe image is uploaded to your media library.

Convert the image to webp

Before webp images, they need to convert them to the correct file format so that they are compatible with WordPress media libraries. To this end, you need an online image converter, such as online-confrt.com.

If you have a website containing several pictures, you can pull these pictures down, convert and upload a new format. In addition, if you are creating a new website, you can easily run the picture content of the new website through the converter tool before uploading the picture.

To use the converter, just drag the image to the position of \”put the file here\”, wait for the conversion process to complete, and then the new image.

在线转换 WebP 图像 Use the online tool to convert the image to webp

Online converting webp image

By default, Adobe Photoshop is not allowed in the webp format Export files. However, you can use the plug -in of the program itself to add this feature. You must this Adob \u200b\u200bE Photoshop (not WordPress) advanced plug -in and add it to the work Photoshop folder on your computer.

Another choice is to use desktop applications. WebPonize, which is suitable for Windows and webponize for Mac, is a desktop application that can be ed and used offline. These programs can convey from JPEG to webp or PNG to webp.

If you are processed existing websites with a large number of images in the media library, you will need a stronger solution to convert the image to the next generation format. To this end, you can share in accordance with the command line tutorial in this webp guide.

Add webp image to your website

After the image format is correct, you can upload them to your website through one of the following two methods: [123 ]

Use SFTP, you can log in to the server and add the image to the UPLOADS folder, bypass the media library, or

    You can edit Functions.phpThe file is uploaded by webp

  1. Add a webp image

as a designer or developer’s biggest benefit to use WebP images. You do not have to do the work of creating files. Instead, you only need to install a conversion plugin. You will upload ordinary images in JPEG or PNG formats, and the plug -in will convert these files into webp to pass the image to your visitors.

The advantage of this method is that you only need WebP visitors will still receive the original file type. Those who can receive the type of webp files will see a faster loading time. Another method is to allow you to upload the webp file to your website. This method is not recommended, because not all browsers support this format. This means that some of your visitors will not be able to view your image.

There are several free and advanced plugins that can convert images to WebP. Here are some free options.

EWWW image optimizer

EWWW Image Optimizer

EWWW 图像优化器

Ewwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwi Free plug -in function. It generates the webp version of JPEG and PNG. It includes many options, such as rewriting rules compatible with Apache, and replaced WebP rewriting options. It is compatible with cache and CDN, and is used with Keycdn’s cache enableer plug -in.

This may be the easiest to use. The built -in WebP function allows you to use a damaged conversion to JPEG, use non -destructive conversion for PNG, and the conversion is automatic. All you have to do is to install the plug -in and enable the function in the WebP tab. No other settings. Short -pixel image optimizer

Shortpixel Image Optimizer from WordPress storage

Shortpixel Image Optimizer is a free plug -in, which can beConvert any JPEG, PNG or GIF to a webp. It uses loss and lossless compression at the same time. It also applies to the cache plug -in supporting webp. It provides WebP images to browsers that can view them, and provide other formats to browsers that cannot be viewed. 短像素图像优化器

It can also choose to use HTML to add WebP images to the front -end page. For this reason, you can use \u0026 lt; picture \u0026 gt; label instead of ordinary \u0026 lt; img \u0026 gt; label. To set it to automatic converting images, this function is only enabled in the \”Advanced\” tab. If necessary, you can restore images.

Webp Express webp from the WordPress memory repository webp Express

Webp Express is a free plug -in that can generate images less than half of JPEG. It will convert JPEG and PNG routing to image converters or images that have been converted. No matter how the image arrives at the server, it can work normally. It is suitable for media libraries, galleries, and theme images referenced by CSS.

It does not apply to the Microsoft IIS server or WAMP, and has not yet been tested by multi -site. It does need some settings to the conversion method, but you have several options. The image will first use the top conversion method. If the method fails, it will work down the list until the method that is applicable to the image. You can drag them in the order you want to use. WebP快递

Opti MozJpeg Guetzli WebP 从WordPress 存储库 OPTI MOZJPEG Gubp

Opti Mozjpeg Guetzli Webp is a free plug -in. When creating, the Google PageSpeed \u200b\u200bInsights was considered. It uses Mozilla Mozjpeg, Google Guetzli, and Google Webp image encoders to convert your image. The encoder can be installed locally or the built -in SSH client. It uses SSH to connect remote access coding with the author’s virtual machineInstrument.

Opti MozJpeg Guetzli WebP It can convert all non -Alpha channel PNG to JPEG. It will back up your image before changing. You can restore your image at any time.

The actual application example of the webp image is the demonstration of the webp image. For my example, I want to show some quality and size differences, so I save the same images in various formats and quality levels for comparison. I actually display the screenshot of the image in my image editor. For these examples, I use Paint.net with a webp plugin. When I upload these images to this website, the size of these images will be reduced a little, so they may look more different than the actual appearance, but I hope they can provide a good comparison.

This is the image I took from Unsplash. This is the JPEG file, which reduces to 800 pixel width and is stored at 98%. This is a 237kb file.

户外野餐 This is the same image saved as PNG. This is a 1.09MB file.

户外野餐 This is the same image saved as a webp. It is also stored at 98% of quality. This is a 199kb file.

户外野餐 This is the same webp file saved as 34%. This is a 35KB file. It is difficult to see any difference between images.

The end of the end

This is our view of what webp and what are webp files. This format greatly reduces the size of the image file, saves a lot of space and shortens the loading time. The main disadvantage is that it is only compatible with a few browsers. Fortunately, for those who use compatible browsers, you can use a plug -in to convert your current library to webp, and provide common file types for those who cannot view the webp format. 户外野餐

Webp is an interesting format. Since it comes from Google, I hope it will eventually become popular and replace the image standards of the network. It has existed since 2010, so even if it has existed for a while, its development is slow. The saving of the file size and loading speed makes it worth using the plug -in image to provide visitors who can use them; this is free speed.

Do you use or plan to use a webp image in the website design?

Please tell us your views on webp in the comments.

Author:

Leave a Reply

Your email address will not be published. Required fields are marked *