Closed artur2000 closed 5 years ago
Thanks, nice to hear you like it.
How did you test? The filename is still the same, only the content is different. Can you provide more information, like Apache logs or even an Apache Rewrite log, a browser version, maybe the HTTP headers of each request, etc.?
You can see it yourself now after the project went live: https://www.ubc-collection.com/unternehmen/galerie/
On this page there are multiple images. In chrome in developer toolbar=>network tab you can see the "type" of the downladed image. Sometimes it is webp, sometimes jpeg.
This has something to do with caching I guess. A user agent that does not support WebP visits your website and the file is cached (you have a proxy somewhere in between?). Now all the other requests serve the jpg version.
I guess you can fix this with the following Apache setting:
Header always set Vary "Accept-Encoding,Accept"
that forces to include the Accept
header to determine if the cached version of a file can be served.
I had no time to test this yet, so you'll have to figure out the details yourself.
The following lead me to this conclusion:
https://www.ubc-collection.com/fileadmin/_processed_/4/e/csm_cbc-duesseldorf-dsh-aussen-01-1080p_c112616b96.jpg
Response:
Vary: Accept-Encoding
Content-Type: image/jpeg
and
https://www.ubc-collection.com/fileadmin/_processed_/4/e/csm_cbc-duesseldorf-dsh-aussen-01-1080p_c112616b96.jpg?v1
Response:
Vary: Accept-Encoding,Accept
Content-Type: image/webp
Hi, we just tested this great extension and observed a strange behaviour. The KewriteRule triggers only sometimes. Eg. for a page with 4 images the browser randomly gets delivered the .jpg version or the .webp version of each image. Both versions exist in "fileadmin/_processed/../../" directory. It does not depends on the image, each of the images on a page shows this behaviour.
Any idea why?