S
S
Spawnnet2019-01-28 17:49:19
JPEG
Spawnnet, 2019-01-28 17:49:19

Using the webp format for images. How to implement this with .htaccess?

Tell me, does anyone have a working example of how to load images using .htaccess on a website in webp format for all browsers? And in cases where this format is not supported, then load the usual png or jpg.
If you have a completely different but working solution, I will be extremely grateful.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
riot26, 2019-01-28
@Spawnet

https://github.com/vincentorback/WebP-images-with-...

B
Boris Syomov, 2019-01-28
@kotomyava

And what does .htaccess have to do with it?
It is on the client to decide in what format to request an image. Or in the application, analyzing the request headers, build html in such a way that it contains supported images.
But what can a web server do about it? Change url of images in html on the fly?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question