Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cool11

macrumors 68000
Original poster
I decided recently to move towards webp images, instead of jpg that I used all the years in a website that I maintain.
So, I downloaded all images to my mac, I converted them to webp.
Same filename, but with .webp file extension instead of .jpg.

The problem is, that if I upload them back to site, the post pages will look for the corresponding .jpg files.
I make my testing in a local mamp server installation on my mac, before trying anything live on site.
Same problem of course, no jpg file, no image display in posts.

So, I need a way, somehow to tell wordpress, that whenever there is a post using a .jpg file,
(if you do not find it),
try to load the same filename but with .webp file extension.

Maybe there is a solution like a plugin to fix every link this way,
or some other way not fixing anything but to tell wordpress to bypass the absence of .jpg and go for the corresponding .webp file.

I hope I will get a workaround with your help.
 
The image links depend on how you have the WP site configured…it may not be enough to just change the file extension at the end of the link.

I don't think you're going to find any magic dust to make that work.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.