New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Content-Type in header for webp images #3731
Comments
Better fix this in the server config or better upgrade the server to a newer version. |
What makes that a better solution over .htaccess?
I haven't found a reference anywhere stating that a more recent version of Apache has added webp by default. Do you have any pointers? |
For example a common used solution is plesk. Plesk uses a mixture of nginx and apache. Nginx serves the static content to speed up the response time. Nginx does not support .htaccess and you will still receive the image without proper content type. |
@Rotzbua, Many, if not most, users of Grav aren't that well versed on infra (I'm one of them) and use plain Apache offered by shared hosting. For these users, .htaccess might be a better choice. |
As a infrastructure person you should know that a project based workaround to fix a mime type with |
There are two wasy to request an image:
|
When requesting images, a correct Content-Type is provided in the header for a jpeg image. When requesting a webp image, no Content-Type is provided in the header.
I guess this is an Apache issue and not Grav, but it can be fixed by adding
AddType image/webp ".webp"
to .htaccess, which could be added by Grav by default.Or it could be added to Apaches config file for the site, using for example:
What do you think? Adding it to .htaccess, or mention it in the docs? Or maybe both...
The text was updated successfully, but these errors were encountered: