Used WebP Express plugin to convert all JPG images to WEBP but realized on its uninstallation that it does it “on the fly” without changing the actual image paths in the database. Is there any way to change actual paths in the database?

I was looking to change all the JPG files on my website to WEBP and tried doing it using the highly recommended WebP Express plugin. It did the job of “physical” file conversion to WEBP very well but I realized that the image paths are changed “on the fly” and the actual image paths in the database stay the same (i.e still point to the old JPG files).

I realized this when on uninstalling the plugin the old JPG images were displaying again and on further examination found htaccess files created by WebP Express to do redirection etc. It also manipulates the various wordpress loops to detect and change the paths to the images files.

I want to avoid this additional overhead and directly change the image paths to point to the converted WEBP version.

Doing it manually is not feasible as there are thousands of JPG files. I am also aware that WEBP files are not universally compatible and I am okay with it. My main concern is improving speed and space utilization.

2 Comments
  1. Some Browser don’t support WebP this is why it’s done this way. Your site would not work on some people’s computers.

  2. They are a bunch of plugins that do this functionality but they only do it like you say on the fly. Going in and editing all the actual pass could be extremely dangerous on a website and make it crash. If even one of them was wrong the whole website could go down. Most of these basically make a second copy of each and then they deliver either the jpeg or Webp to the end user depending on what web browser they are using. Some web browsers do not support Webp.

    CDNs also work the saw way. You can upload your files in any form but they will be delivered in either Webp or jpg depending on the browser.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer