Nginx does not serve avif

Francis Daly francis at daoine.org
Fri Oct 7 12:14:28 UTC 2022


On Fri, Oct 07, 2022 at 02:00:44PM +0200, Martin Wolfert wrote:

Hi there,

> i found the issue!

Good stuff!

> Solution: When enabling the webp caching compatibility in WP Rocket
> (WordPress plugin), the nginx rules / config could not work. Because WP
> Rocket adds ".webp" as suffix to all .jpg images. So having the suffix set
> to bla.jpg.webp, the Nginx location ( /location ~ \.(jpg|png)$ {/ ) for sure
> could not match! So disabling the webp caching compatibilty in WP Rocket
> solves the problem.

Nice.

My next guess would have been that the browser was requesting thing.jpg,
and getting back content that was not a jpeg image, and was getting
confused by that mismatch.

My guess would have been wrong :-)

Cheers,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list