Changr png , jpg to Webp in Wordpress
I want to change jpg png to webp in bulk for free on wordpress, is there any plugin for this? i.e in bulk for free
17 Replies
I'm not sure if there's a free version of this but this makes it really easy to bulk convert from your media library: https://kraken.io/plugins
image-magick
can definitely do it.
If you have access to the files and a bash prompt, it'd be: for file in *.jpg *.jpeg *.png; do convert "$file" "${file%.*}.webp"; done
.I have too many images on my portfolio wordpress site, thats why I want chnage them from jpg to webp for better perfeormance of web.
You want a plugin that wil both convert them & update the database to point to the new files?
Yes change images to Webp
Yeah.
The command I gave above will convert your files to
.wepb
. The tricky part is going to be updating the database.
Your HTML is in the database, right? Not .php
files?I am using the template, and there are php files in Theme Editor. How to know HTML is in the database?
If you're editing files in the browser, they're probably in the database. If you've editing in VS Code, they're standalone files.
I am doing in browser
Unfortunately I don't know of any software that will convert to
.webp
& update the database.
You can use the for
loop I posted above to convert your images, but you'll likely have to manually convert your HTML by hand page by page.
You could theoretically write some SQL to update everything, but it'd not be simple.
How many pages do you have?around 4 to 5 but it have 100s of images
luxjewelryretouch
LUX Jewelry Retouch
Jewelry Retouching & Editing Services | LUX Jewelry Retouch
Transform your jewelry photos with our expert Jewelry Retouching services. We enhance every detail by editing, making your pieces shine. Perfection in every pixel.
this is my site
The
for file in *.jpg *.jpeg *.png; do convert "$file" "${file%.*}.webp"; done
command will convert all your images. Then you can do a find/replace in your pages.just use a plugin like this:
https://wordpress.org/plugins/wp-smushit/
dont reinvent the wheel
btw, use wordpress' standard stuff to handle the images, as it generates all the stuff you need automatically for you (like the multiple sizes for your images)
smush is paid, right?
it might have paid features
click the link and see for yourself