WordPress Accelerated Website Images to webp format

Often times, ourWordPressOpen speed is very slow, is due to too many pictures in the web page, the server bandwidth itself is not enough to cause this situation, and then a check, the web page in the picture is too big, each picture is a few hundred K, or even 1-2M, open the web page to the site to load these pictures, greatly reducing the web page to open the speed, so at this time we choose to optimize the picture, reduce the size of the picture of the way to speed up the site.

WordPress Accelerated Website Images to webp format

Here we are going to introduce a new image format, the webp format.

WebP is a modern image format developed by GoogleIt is designed to provide smaller file sizes and higher image quality. It supports both lossy and lossless compression techniques while allowing transparency and animation. Compared to traditional JPEG and PNG formats, WebP can significantly reduce file size while maintaining image quality.

So the advantage of webp is that it doesn't compromise the quality of the image, but the image size is smaller.

Next, we'll explain how to convert all the images on your website to webp format.

1, first of all, we will be in the site directory of all the picture attachments into webp format, in the background to find Images to Webp plugin, and install it!

WordPress Accelerated Website Images to webp format

Plugin installed We then add the corresponding code in accordance with the instructions of the plugin, after the enable, otherwise the enable will report an error.

2, add the code needed for the plugin:

WordPress Accelerated Website Images to webp format
WordPress Accelerated Website Images to webp format

First code:

map $arg_no_webp $no_webp{
    default "";
    "1" "no_webp".
}

map $http_accept $webp_suffix{
    default "";
    "~*webp" ".webp"; }
}

After adding the first piece of code, restart Nginx.

WordPress Accelerated Website Images to webp format

Next, open the site's configuration and add another piece of code.

WordPress Accelerated Website Images to webp format

Second code:

location ~* ^/. +\. (png|gif|jpe?g)$ {
    add_header Vary Accept.
    try_files $uri$webp_suffix$no_webp $uri =404;
}

At this point, the plug-in required code, all added to complete, and then we return to the website background plug-in management, start Images to Webp plug-in.

WordPress Accelerated Website Images to webp format

Wait for the prompt to complete (if you site more pictures, please wait patiently, the conversion takes time, may be more than ten minutes, or 1-2 hours), so far, all the pictures of your site into webp format, the picture volume is smaller.

Here we open the site to test, the effect (open the page press F12, select Network, you can see):

WordPress Accelerated Website Images to webp format

Contact Us
Can't read the article? Contact us for a free answer! Free help for personal, small business sites!
Tel: 020-2206-9892
QQ咨询:1025174874
(iii) E-mail: info@361sale.com
Working hours: Monday to Friday, 9:30-18:30, holidays off
Posted by photon fluctuations, retweeted with attribution:https://www.361sale.com/en/8890/

Like (2)
Previous April 25, 2024 1:55 pm
Next April 25, 2024 pm3:48

Recommended

Leave a Reply

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

Contact Us

020-2206-9892

QQ咨询:1025174874

E-mail: info@361sale.com

Working hours: Monday to Friday, 9:30-18:30, holidays off

Customer Service
In order to facilitate global user registration and login, we have canceled the telephone login function. If you encounter login problems, please contact our customer service for assistance in binding your email address.