Quote Originally Posted by balihr View Post


Yeah, the "else" was completely useless, wasn't paying attention...

So... TheGrimReaper - here's a workaround for you to use webp, and at the same time you still get to cater those rich iphone people. There's really no need to force them into using something else - people are slaves to habits and I'm pretty sure they will rather shop elsewhere than to be forced to use a different app, even it's maybe 50 times better... Don't let any sale escape you, no need for that. The solution above is a piece of code from includes/functions/html_output.php - you can find the file and add the code in red.
Then, simply put a matching jpg image next to your current webp images. So, if you have images/armyjeep1.webp, just manually upload another alternative image to the same folder and name it the same but with a jpg extension to have images/armyjeep1.jpg. This will let you use the picture tag so you let the browser choose which image to display - all the good browsers will opt for the webp, and Safari will still get to use the fallback jpg and Safari users will be able to see the images. Apart from needing more disk space (which is nowadays usually not an issue), this should help you keep your webp images and keep the site fast(er), but also provide a fully working website for all Safari users.
I really like your thinking with "not letting a sale get away" it's good business sense. Quite a bit more work to capture it, but the reward may well be worth it. I have to weigh the pain, time and space expense against the gains potential, but promise I'll certainly put some mental effort into it. My wrists really ache these days, I had to get that dreadful carpal tunnel surgery back in the late 90's that I never really got back to 100% after. Gotta go soak em in cold water because the heat gets so bad., burns all the way up to my shoulders. That's a limiting factor that I really dislike immensely. Voice recognition speech to text isn't always accurate and gotta make a lot of corrections when I use big words and long sentences. Still looking for that fountain of youth.