Skip to content

avif support #109

@Enter-tainer

Description

@Enter-tainer

pros:

  1. 体积比 jpg 小很多。一些说法认为质量不变的情况下,体积可以 0.5x。对于高像素机型,接片的场景,可以极大减少文件体积。相关 benchmark:https://cloudinary.com/blog/jpeg-xl-and-the-pareto-front#high_quality
  2. 浏览器支持更好:heif,jxl 有类似的performance和能力,但是浏览器支持比较一般。https://caniuse.com/heif https://caniuse.com/jpegxl 。相比之下 avif 是全绿的 https://caniuse.com/avif

之前尝试过 hack 代码来添加支持,不过好像是炸在了缩略图 build 的环节。昨天搜了下 sharp 应该是支持 avif input 的。所以可能要再看看

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions