![]() |
Mass conversion of images - Wordpress
Hi. Did anyone already have a need to convert all existing photos on the website from jpg to WEBP or AVIF format?
The site is on WP and there are a few thousand blogs posts which means a lot of images. I know there are plugins like Webp converter for media, but what worries me is that it will do redirects instead of really replacing images in posts. On top of that, there are many nextgen galleries too. thanks |
What is the need for conversion?
Once you have the new image files, a search and replace string should prevent redirects, but sounds like a hassle. https://wordpress.org/plugins/better-search-replace/ Plus a lot of stuff doesn’t play well with those formats. |
Quote:
<picture> <source srcset="boobies.webp" type="image/webp"> <source srcset="boobies.jpg" type="image/jpeg"> <img src='boobies.jpg'> </picture> An option would be to use the free Windows tool Xnconvert, download all your site's jpg files to your pc, convert them all with Xnconvert, then reupload those webp files. PHP can convert jpg images in 3 or 4 lines of code, using ImageCreateFromString and store the webp file with imagewebp. Just include it in the upload form so it's automated. You can probably hire someone of Fiverr to do that for you for a few bucks, as it probably takes 10 minutes or so to get it fixed. |
I use "WebP Converter for Media" and it works perfectly. It also detects browsers that do not support Webp or AVIF images and shows them JPEG or PNG images. Try it.
|
Quote:
Quote:
|
Quote:
I don't use WP so I wouldn't know for sure, but my guess is that Wordpress uses its own custom php function for showing images inside a blog post. Meaning, you would only need to change a line or two in the source code to apply that change (to also include webp images) in all blog posts, instead of manually changing thousand blog posts. But again, I'm not a Wordpress expert, but I guess such thing would be the case. Does Wordpress store posts inside the database using some sort of markdown? If that's the case, it's 100% certain there's some function inside the source code that takes care of the markdown parsing of the images. |
Quote:
1) If you want to automatically convert images in new posts, just put the following code into the Expert -> Custom PHP code box in your feed settings: Code:
if (!cseo_post_exists($post)) { 2) If you want to do the same trick with images in already existing posts, click Post Modification Tools, put the following code into the box and execute it: Code:
preg_match_all('/<img.+?src=["\'](.+?)["\'].*?>/is', $post->post_content . $post->post_excerpt, $matches); If you want to convert your images into a different format, simply replace IMAGETYPE_WEBP with the appropriate value, e.g.: IMAGETYPE_JPEG, IMAGETYPE_PNG etc. Find more examples for Modification Tools here: https://www.cyberseo.net/modification-tools/#examples P.S. Make sure you are using the most recent version of CyberSEO Pro, which is 9.016 ATM. |
https://image.online-convert.com/convert/gif-to-webp
supports mass conversion, also from Dropbox and Google Drive |
Quote:
|
Quote:
You can do it here for 50% of the base price: https://www.cyberseo.net/upgrade/ |
The internet 1998 : Wow, I'm free!!
The internet today : I'm a slave of Google artificial intelligence. :2 cents: |
Thanks to all people answering above.
Hosting support did the whole job for me. |
Quote:
|
Hm..I've noticed a drop in traffic after replacing jpegs with WEBP. At the moment I am not sure is it the result of changing WordPress theme or traffic loss coming from google images searches.
So I am now trying to see the number of searches coming from google images. I am using analytics and trying with source/medium section but there are no results. Any Idea how to filter and see only google images traffic? |
Quote:
But if they are no longer indexed, did you literally replaced the jpg's for webp files only, rather then setting multiple formats with the <picture> tag? Otherwise, I don't see what could cause the de-indexing to happen. |
All times are GMT -7. The time now is 11:49 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123