













Notably, for maximum compatibility this package is still CommonJS (not yet ESM). Node minimum is still 18+ (unchanged from Eleventy Image v4).
useCacheValidityInHash option has been removed #146<img width> attribute (if single integer) as eleventy:widths value #234The following changes likely require no action on your part (but are nonetheless breaking):
@11ty/eleventy-fetch from v4 to v5@11ty/eleventy-utils from v1 to v2{ jpeg: [] } #242fetch() (no more node-fetch, via eleventy-fetch upgrade) and works better with caching on remote urls, consistency on file names with sync methods #252 #262 #146returnType: "html" option will return the generated HTML directly instead of the metadata object #267
htmlOptions: {} are options passed to the generateHTML functionformatFiltering option). Filters out output formats that do not support animation or transparency automatically.
failOnError: true option to avoid throwing an error when image processing fails (and failing your build) #225 See also the eleventy:optional attribute below.transform hook for running your own sharp customizations #52 (comment) (can be used to add custom cropping!)eleventyConfig.addPlugin #2638 min and 16 max) #258urlPath option #239generateHTML: Missing sizes error relaxed when using loading="lazy" HTML, swap to use sizes="auto" instead #207generateHTML option (also available via htmlOptions) forfallback: "smallest" to choose smallest image for <img> fallback and width/height dimensions #265 #129<img width> attribute (if single integer) as eleventy:widths value #234eleventy:optional HTML attribute so that errors in image processing will not fail the build (in different ways) #259
src attributeeleventy:optional="keep"eleventy:optional="placeholder"<picture> nodes #214img and picture elements #214 (comment) #241 #243 #251Full Milestone (×26 issues closed): https://github.com/11ty/eleventy-img/milestone/22?closed=1
Full Changelog (×75 commits, +2,347/-992): v5.0.0...v6.0.0
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。