Hi. How to implement and use Webp image upload.
Lz127 Hi, you can add any file extension to the list of allowed file types in the config.json file.
But when used in posts and on pages, such pictures are still not shown.
Lz127 Hi, yes. Only .jpg, .png and .gif are supported and will be resized to be used as thumbnails. But you can still use Webp images in Markdown content. However, I can only recommend to use one of the three most common formats to get all features working properly.
mad Ok. Thank you
Is there a way to serve both images in such a way that if a visitor is using Safari browser (which cannot see .webp) they will see an alternative image?
I tried to experiment with this, but it fails:
<source srcset="/images/index.webp" type="image/webp">
<source srcset="/images/index.jpg" type="image/jpeg">
<img src="/images/index.webp" alt="Climb Kilimanjaro">
Sorry! The solution is simple:
<img src="/images/index.webp" alt="Climb Kilimanjaro" onerror="this.src='/images/index.jpg';" />