Open TastySoul opened 4 years ago
I'll need some more info to help you here.
What error do you get? How do you upload the image? The plugin only rewrites requested images to their webp version. If the webp version does not exist, it tries to convert the original image to the webp format.
The plugin should not interfere wit your uploads.
Having the webp check server side would mean that every image that gets requested needs to be handled by PHP. This would result in a huge performance issue.
Sadly there is not much more i can provide. Should be pretty easy to recreate. It's uploaded from frontend. I think its trying to verify image but it gets redirected.
Check out the network
tab and see what the server returns. Maybe there is some additional information. Also, check your storage/logs/system.log
file.
Not much info returned just 404. System log has no info at all.
Another idea for solution. What about using picture tag ? And automatically attach webp to it. Would get rid of htaccess.
<picture>
<source srcset="img/awesomeWebPImage.webp" type="image/webp">
<img src="img/creakyOldJPEG.jpg" alt="Alt Text!">
</picture>
But then you would have to rewrite the markup of the page. And there is a big difference between a picture
and a single img
tag, this will break people's websites if it is applied automatically.
There's nothing stopping you from using the picture element manually. You can edit the .htaccess
rules to your needs. All they do is redirect an image to the webp.php
helper so it gets converted automatically.
Hi I get error when uploading images from frontend with enabled webp conversion. I quess it's rewriting upload path or messing with upload verification. Wouldnt it be better to detect support in plugin and change picture based on that ?