Nikolay Mihaylov
Nikolay Mihaylov

Reputation: 3884

Symfony LiipImagineBundle avoid .jpg to .jpg.webp redirect

Is there an easy way to disable the 302 redirect described in the documentation below?

What LiipImagine does:

If browser supports WebP, the request /media/cache/resolve/path/images/cats.jpeg will be redirected to /media/cache/path/images/cats.jpeg.webp otherwise to /media/cache/path/images/cats.jpeg

What i would like it to do:

If browser supports .webp format, serve the .webp directly without the 302 redirect. This will save unnecessary requests on pages with alot of images.

Documentation: https://symfony.com/bundles/LiipImagineBundle/current/basic-usage.html#use-webp-if-supported

Upvotes: 0

Views: 12

Answers (0)

Related Questions