Closed glenrobson closed 3 years ago
Hm, tomorrow I will take a look at implementing this or something similar: https://www.thisdaysportion.com/posts/automating-webp-production-in-jekyll/
On Tue, Oct 12, 2021 at 19:01 Glen Robson @.***> wrote:
It doesn't look like Safari has good webp support:
[image: Screenshot 2021-10-12 at 23 58 49] https://user-images.githubusercontent.com/1969268/137040096-46951396-08d3-4fd9-9618-f04a07c35e2a.png
I'm using macOS Catalina Safari 14.0.1
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/IIIF/iiifc-theme/issues/61, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAT4RSNNR5XB3RHSDTDPMDUGS43JANCNFSM5F3ZYOKQ .
@glenrobson is the webserver configuration option here an option for us? https://github.com/sverrirs/jekyll-webp#advanced-use-webserver-configuration
Yes I think that would be possible although I was half hoping to get rid of the nginx proxy in front of the website to remove one layer and save some money. Once I've got the validators working Ill know if I can do with out the proxy.
I thought the 'automated-webp-production-in-jekyll' article looked promising. Did you give that a go?
Just documenting what we briefly discussed on the call. The two links above point to a plugin called jekyll-webp which looks good and maybe is something we should look at. It converts the jpg/pngs to webp when it builds the website so you only need to have the jpgs/pngs in the repo not the webp.
It provides two ways of showing these files but assumes both the jpg/png and webp are present in the generated website. I have the HTML picture / option method working and we could look at the server option in the second link which instead of having the two image links in the html re-writes the request so that if you request a jpg and you support webp it will forward you to the webp version.
The problem I've come across is we have some webp files with out a png/jpg source image. We will need to generate a jpg/png version of these files to do either the HTML method or the server redirects.
It looks like there isn't a good way to do webp/png switching with css so the hero images are an issue. The server option would fix this...
I think its all fixed. I've implemented the HTML method for most but for the hero images I've done it server side. It all looks good on safari.
It doesn't look like Safari has good webp support:
https://caniuse.com/webp
I'm using macOS Catalina Safari 14.0.1