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
vince
vinceโ€ข7mo ago
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
dysbulic ๐Ÿ™
dysbulic ๐Ÿ™โ€ข7mo ago
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.
Hamza Naeem
Hamza Naeemโ€ข7mo ago
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.
dysbulic ๐Ÿ™
dysbulic ๐Ÿ™โ€ข7mo ago
You want a plugin that wil both convert them & update the database to point to the new files?
Hamza Naeem
Hamza Naeemโ€ข7mo ago
Yes change images to Webp
dysbulic ๐Ÿ™
dysbulic ๐Ÿ™โ€ข7mo ago
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?
Hamza Naeem
Hamza Naeemโ€ข7mo ago
I am using the template, and there are php files in Theme Editor. How to know HTML is in the database?
dysbulic ๐Ÿ™
dysbulic ๐Ÿ™โ€ข7mo ago
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.
Hamza Naeem
Hamza Naeemโ€ข7mo ago
I am doing in browser
dysbulic ๐Ÿ™
dysbulic ๐Ÿ™โ€ข7mo ago
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?
Hamza Naeem
Hamza Naeemโ€ข7mo ago
around 4 to 5 but it have 100s of images
Hamza Naeem
Hamza Naeemโ€ข7mo ago
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.
Hamza Naeem
Hamza Naeemโ€ข7mo ago
this is my site
dysbulic ๐Ÿ™
dysbulic ๐Ÿ™โ€ข7mo ago
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)
Hamza Naeem
Hamza Naeemโ€ข7mo ago
smush is paid, right?
แผ”ฯฯ‰ฯ‚
it might have paid features click the link and see for yourself