Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Imagine: give a filter's cached file the extension of its output format (WebP)

已关闭
#402 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

已经有一个关联 PR 被合并了。

  • #404 来自 @silverbackdan —— 已合并
  • #409 来自 @silverbackdan —— 已合并

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
php, symfony
领域
backend

调研方向

The payload names no files. Start with how the bundle builds the liip Imagine cache path for a filter set and how it sets the stored object's content type, including the local adapter's content-type detection. Reproduce by configuring a filter set with format: webp and checking the cached file's extension and the served Content-Type. Done means the cached variant carries the output format's extension or an explicit WebP content type, with a test covering it. The issue leaves open whether to change the extension or set the content type, so confirm the approach with maintainers first.

由索引模型根据 Issue 内容生成。

描述

From components-web-app#143. With format: webp on a liip filter set, the bundle's media objects correctly report image/webp, and the stored bytes are WebP, about half the size of the JPEG at q82. But liip keeps the source's name, so the variant is stored as cache/general/photo.jpg. Anything that serves by extension (the local adapter, and possibly GCS depending on how it detects the type) then sends Content-Type: image/jpeg. liip's webp.generate doesn't help either: the bundle never asks for the WebP URL, and every filter would be generated twice.

Proposed: when a filter set has a format, store and resolve its cached file with that extension (or set the stored object's content type explicitly). Optionally, expose both variants in mediaObjects. The template would then switch its filters to WebP.

主要语言
PHP
星标
32
派生
8
平均合并
56 分钟
30 天内合并 PR
164

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

components-web-app/api-components-bundle 的其他 Issue

查看 components-web-app/api-components-bundle 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。