Avif images served with incorrect `Content-Type` header
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- nginx, wordpress
- 领域
- devops, infrastructure
调研方向
首先定位 EasyEngine 生成的 Nginx 服务器配置,并检查如何为图像扩展名分配 MIME 类型。使用 AVIF 图像重现该问题,并检查其响应标头;完成的标准是 AVIF 响应使用 Content-Type: image/avif,同时现有的 WebP 行为保持正确。
由索引模型根据 Issue 内容生成。
描述
Description
I am using EasyEngine to host a WordPress website that utilizes the Modern Image Formats plugin to convert images to WebP and Avif formats. While WebP images are served correctly, Avif images are being served with an incorrect Content-Type header (application/octet-stream instead of image/avif).
Steps to Reproduce:
- Install EasyEngine on a server.
- Create a WordPress site using EasyEngine.
- Install the Modern Image Formats plugin.
- Configure the plugin to convert images to WebP and Avif.
- Upload an image and observe the
Content-Typeheader for the generated Avif version.
Expected Behavior:
Nginx should serve Avif images with the Content-Type: image/avif header.
Actual Behavior:
Nginx is serving Avif images with the Content-Type: application/octet-stream header.
Additional Information:
- EasyEngine version:
EE 4.8.0 - Site having issue: https://privacysandbox-stories.com/
Suggested Solution:
Update EasyEngine's Nginx configuration to include the following line within the server block:
location ~* \.(avif)$ {
add_header Content-Type image/avif;
}
- 主要语言
- PHP
- 星标
- 2.2k
- 派生
- 421
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 10
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
EasyEngine/easyengine 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 70/100
EasyEngine/easyengine#1427 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
EasyEngine/easyengine#1893 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 25/100
EasyEngine/easyengine#1875 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
EasyEngine/easyengine#1810 · 2 条评论 · 4 个 reaction ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
EasyEngine/easyengine#1800 · 2 条评论 ·
维护者通常 1 天内回复
查看 EasyEngine/easyengine 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
woocommerce/woocommerce-google-analytics-integration#699 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 60/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
ProfessionalWiki/NeoWiki#1675 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 70/100