Skip to content

Prerelease: Eleventy Image v6.0.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@zachleat zachleat released this 04 Jan 22:00
· 12 commits to main since this release
  • returnType: "html" option will return the generated HTML directly instead of the metadata object #267
    • htmlOptions: {} are options passed to the generateHTML function
  • Output format filtering (opt-out with formatFiltering option). Filters out formats that do not support animation or transparency automatically.
    • Animation friendly formats #260
    • Transparency friendly formats #105
  • Adds errorOnFail: true option to avoid throwing an error when image processing fails (and failing your build) #225 See also the eleventy:optional attribute below.
  • Keep ICC profiles by default to retain all the colors of Display-P3 and AdobeRGB images #244
  • Adds new transform hook for running your own sharp customizations #52 (comment) (can be used to add custom cropping!)
  • Improved error messaging when incorrectly using the default export with eleventyConfig.addPlugin #263
  • Concurrency autoscales per machine resources (between 8 min and 16 max) #258
  • Upgrade eleventy-fetch dependency to use platform native fetch and work better with caching on remote urls, consistency on file names with sync methods #252 #262 #146
  • Support full URLs in urlPath option #239

generateHTML

  • Missing sizes error relaxed when using loading="lazy" HTML, swap to use sizes="auto" instead #207
  • New generateHTML option (also available via htmlOptions) forfallback: "smallest" to choose smallest image for <img> fallback and width/height dimensions #265 #129

Transform Method

  • Adds eleventy:optional HTML attribute so that errors in image processing will not fail the build (in different ways) #259
    1. Remove src attribute
    2. Leave as-is
    3. Replace with a transparent Data URI
  • Decode file name paths #253
  • Support <picture> transformations #214
  • Preserve attributes on img and picture elements #214 (comment) #241 #243 #251
  • Reuse existing <img width> attribute (if single integer) as eleventy:widths value #234
  • Fix inconsistent <picture> usage when formats were filtered #242
  • Fix for relative references when using permalinks with non-index.html file names #236

Full Milestone: https://github.com/11ty/eleventy-img/milestone/22?closed=1
Full Changelog: v5.0.0...v6.0.0-beta.1

Fast-follow v6.0.0-beta.2 already released: https://github.com/11ty/eleventy-img/releases/tag/v6.0.0-beta.2