Wrong content/type in headers: image/jpeg instead of webp

Cloudflare is serving the content-type as “image/jpeg”, where it’s supposed to be “image/webp”.

Here’s the image link:
https://prekure.com/wp-content/uploads/2020/04/2368_PRE_Insta_Icons2.jpg.webp

Here’s the response:

What’s the reason for this behavior? Any ideas?

Thank you in advance,
Serge

Here’s a solution if anyone encounters this:

This happens because the origin server isn’t serving the proper content/type and Cloudflare simply passes it, without altering or fixing it. Which is a good behavior for control, I suppose.

The problem gets solved by adding the mime type to the .htaccess on your server:

# Add webp file type
<IfModule mod_mime.c>
	AddType image/webp .webp
</IfModule>
2 Likes