Many times, our WordPress open speed is very slow, is due to too many pictures in the web page, the server's 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 large hundreds of 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 to Reduce the size of the picture way to speed up the website.
![Image[1] - WordPress Accelerated Website Image to webp format - Photon Fluctuation Network | Professional WordPress Repair Service, Worldwide, Fast Response](https://www.361sale.com/wp-content/uploads/2024/04/2024042501153133.png)
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 plug-in, and install the
![Image[2] - WordPress Accelerated Website Image to webp format - Photon Fluctuation Network | Professional WordPress Repair Service, Worldwide, Fast Response](https://www.361sale.com/wp-content/uploads/2024/04/2024042501511092.png)
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:
![Image[3] - WordPress Accelerated Website Image to webp format - Photon Fluctuation Network | Professional WordPress Repair Service, Worldwide, Fast Response](https://www.361sale.com/wp-content/uploads/2024/04/2024042501551869.png)
![Image[4] - WordPress Accelerated Website Image to webp format - Photon Fluctuation Network | Professional WordPress Repair Service, Worldwide, Fast Response](https://www.361sale.com/wp-content/uploads/2024/04/2024042502024585.png)
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.
![Image[5] - WordPress Accelerated Website Image to webp format - Photon Fluctuation Network | Professional WordPress Repair Service, Global Reach, Fast Response](https://www.361sale.com/wp-content/uploads/2024/04/2024042504184831.png)
Next, open the site's configuration and add another piece of code.
![Image[6] - WordPress Accelerated Website Image to webp format - Photon Fluctuation Network | Professional WordPress Repair Service, Global Reach, Fast Response](https://www.361sale.com/wp-content/uploads/2024/04/2024042502083184.png)
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.
![Image [7] - WordPress Accelerated Website Image to webp format - Photon Fluctuation Network | Professional WordPress Repair Service, Worldwide, Fast Response](https://www.361sale.com/wp-content/uploads/2024/04/2024042502190153.png)
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):
![Image [8] - WordPress Accelerated Website Image to webp format - Photon Fluctuation Network | Professional WordPress Repair Service, Worldwide, Fast Response](https://www.361sale.com/wp-content/uploads/2024/04/2024042502220118.png)
Link to this article:https://www.361sale.com/en/8890The article is copyrighted and must be reproduced with attribution.

















![Emoji[wozuimei]-Photonflux.com | Professional WordPress repair service, worldwide, rapid response](https://www.361sale.com/wp-content/themes/zibll/img/smilies/wozuimei.gif)
![Emoticon[baoquan] - Photon Wave Network | Professional WordPress Repair Services, Worldwide Coverage, Rapid Response](https://www.361sale.com/wp-content/themes/zibll/img/smilies/baoquan.gif)

No comments