- 937fd37: fix: log an unknown image ID instead of throwing
-
2ccbeeb: Drop applied-transform directives from the
as=metadataoutputThe
as=metadataexport no longer includes the applied-transform directive values (flip,quality,rotate, ...), only the final outputwidth,height,format, the image's sharp metadata and thesrc. The applied transforms cannot be reconstructed from a cached file, so previously a metadata import that hit a cache entry could fail with aMISSING_EXPORTerror or silently omit those fields; dropping them makes the export deterministic across cache hits and misses. -
2ccbeeb: Make
ImageConfiga record of single-string directives, excluding output-format parametersImageConfigvalues are now always single strings. The output-format parameters that previously kept their array values onconfigno longer appear in the configs at all:resolveConfigsnow returns an array of single-value directive records (ImageConfig[]), excluding the output-format parameters and theasoutput format selector that previously appeared as array values onconfig.- Transform factories and options now receive only the single-value directives, so
metadata[key]isstring | undefinedrather thanstring | string[] | undefined. - Output format parameters and the
asselector no longer affect the generated cache id, since they only influence how the already-processed image is serialized. URLs that differ only in these parameters share a single cache entry. - Every key in
outputFormatsis excluded from the configs, including custom output formats. A custom output format whose name collides with a transform directive name suppresses that directive (e.g. a custom output format namedblurmakes?blur=5stop applying the blur transform); name custom output formats to avoid directive names, since any key matching an output format is dropped from the configs.
-
2ccbeeb: Report the encoded image's metadata on a cache miss
A metadata import now reports the same raw sharp metadata whether the image came from the cache or a fresh process: the cache-miss path reads the encoded output's metadata instead of the source image's, so fields like
isProgressive,hasAlpha,pagesordensityno longer differ between the two. -
Updated dependencies [2ccbeeb]
-
Updated dependencies [2ccbeeb]
- imagetools-core@12.0.0
-
3b3c42b: breaking:
ImageMetadatais no longer a flat object extending sharp'sMetadata. It is now{ info: { width, height, autoOrient }, transforms: AppliedTransforms }, wheretransformsrecords the values applied by each transform. Custom transforms and output formats that read or write these fields must be updated to the new shape.breaking:
TransformOptionandImageTransformationnow receive the threadedImageMetadataas their first argument instead of reading and writing state on the sharp instance. ThegetMetadata/setMetadatafunctions and theMETADATAsymbol are removed.ProcessedImageMetadatais renamedProcessedImage,TransformResultis renamedApplyTransformsResult, andTransformStateis renamedAppliedTransforms.Custom transforms that previously stored their own values on
image[METADATA]can record them onstate.transformsinstead. BecauseAppliedTransformsis an exportedinterface, it can be extended from your own code via declaration merging to add typed custom fields:declare module 'imagetools-core' { interface AppliedTransforms { myCustomValue?: string } }
Values written to
state.transformsare included in theas=metadataoutput, so this also lets custom output formats consume them.breaking: the
pixelDensityDescriptorfield is removed fromImageMetadata. Pixel density descriptors are now derived on the fly from thebasePixelsdirective and the rendered image width, so they no longer depend on the build cache and work with or without aw/h/aspectdirective.The
vite-imagetoolsplugin now reports the actual rendered width and height on the metadata, reconciled against the encoded output on every transformation, instead of the values declared by the transforms (whichrotatenever updated). Theas=metadataoutput keeps its previous flat shape, so it is unchanged for existing users. -
efe000b: breaking: require vite 8
- d0dc5ab: fix: write build cache entries atomically, so an interrupted build can't leave a truncated entry that later builds read back as valid
- e7cef2f: perf: hash the source file bytes instead of a decoded buffer when building cache keys, so the plugin no longer pays a full sharp decode for every image on every build
- febf95d: fix: keep the
formatdirective's value when restoring images from the build cache, so emitted asset filenames no longer flip between.jpgand.jpeg - 8b44393: chore: upgrade to sharp 0.35.3"
- Updated dependencies [3b3c42b]
- Updated dependencies [8b44393]
- imagetools-core@11.0.0
- 77d4925: chore: upgrade to sharp 0.35
- Updated dependencies [987ebef]
- Updated dependencies [77d4925]
- imagetools-core@10.0.0
- c30beff: breaking: require Vite 7 and Node 22
- c30beff: feat: implement Vite hook filters for improved performance
- e4e74d4: fix: use raw cached bytes instead of re-encoding through sharp
- 4c15f51: fix: avoid corruption and build errors caused by concurrent access to cache files
- 068fe00: fix: avoid hitting the filesystem multiple times when restoring from cache"
- Updated dependencies [81887b8]
- imagetools-core@9.1.0
- dfb819e: fix: correct output of
originalFilenamein Vite manifest
- 91332bc: breaking: drop support for Node 18
- Updated dependencies [91332bc]
- imagetools-core@9.0.0
- d39cc2c: breatking: add
autoOrientdirective from Sharp 0.34.0, defaulting to automatically apply it to every image. An opt-out is available vianoAutoOrient.
- Updated dependencies [d39cc2c]
- imagetools-core@8.0.0
- 2afafeb: fix: add originalFilename to emitted asset in the mainfest.json
- 28a6e8b: chore(deps): upgrade sharp to 0.34.1
- Updated dependencies [28a6e8b]
- imagetools-core@7.1.0
- Updated dependencies [c530897]
- imagetools-core@7.0.2
- c4a0dc7: fix: correct URL concatenation in dev mode when origin set in server options
- 57e070e: fix: attempt to make sharp dependency declaration compatible with yarn
- Updated dependencies [57e070e]
- imagetools-core@7.0.1
- f049b7f: fix: consistent image id hashes across machines
- 29b3fed: fix: correctly set avif format when file is read from cache
- c4fdd3a: breaking: require Node 18 or newer to align with Vite and Vitest
- 7542fa5: feat: add "inline" directive
- 4819fc1: feat: caching of generated images
- dc25e4b: feat: support Vite's
server.originoption
- 755912c: fix: use URI-decoded pathname when emitting file
- Updated dependencies [dc2f16f]
- Updated dependencies [c4fdd3a]
- imagetools-core@7.0.0
- 0eca643: chore: bump sharp to 0.33.1
- Updated dependencies [0eca643]
- imagetools-core@6.0.4
- 1bdfe74: fix: make
generateImageIDwork for files with spaces - 216e40a: fix: avoid using fs/promises
- 5d7a77d: chore: update sharp to 0.33
- Updated dependencies [5d7a77d]
- imagetools-core@6.0.3
- e0ba6c0: fix: corrected imports to compile with
"moduleResolution": "nodenext" - Updated dependencies [e0ba6c0]
- imagetools-core@6.0.2
- fcd7389: chore: upgrade @rollup/pluginutils
- Updated dependencies [fcd7389]
- imagetools-core@6.0.1
- c54ad96: fix: refresh images in dev mode when they change
- Updated dependencies [c54ad96]
- imagetools-core@6.0.0
- 63141c8: fix: avoid duplicate widths in output
- 7bd11b7: fix: address issues when preventing upscale
- Updated dependencies [7bd11b7]
- imagetools-core@5.1.1
- 3923ab2: fix: address typo in namedExports type definition
- b4aa0a5: feat: option to override Vite's namedExports
- b84b271: feat: allow usage of all supported sharp output formats
- Updated dependencies [b84b271]
- imagetools-core@5.1.0
- 4ebc88f: breaking: remove deprecated options
- 378c863: breaking: simplify picture, image, and srcset output formats and remove source output format. This is both simpler and will enable pixel density descriptors
- Updated dependencies [378c863]
- Updated dependencies [378c863]
- Updated dependencies [378c863]
- imagetools-core@5.0.0
- 93356e6: fix: actually expose recently added types
- 5d9d4f2: chore: create and expose type aliases
- 49a89a6: feat: make image metadata available in defaultDirectives
- Updated dependencies [500e4fc]
- imagetools-core@4.1.0
- Updated dependencies [5cbdbe8]
- imagetools-core@4.0.6
- e4bba3c: fix: correct detection for Vite build vs serve mode
- Updated dependencies [9104638]
- imagetools-core@4.0.5
- 474170c: chore: upgrade dependencies
- Updated dependencies [474170c]
- imagetools-core@4.0.4
- 3a439ae: fix: allow image same size as original by default. I.e. even when upscaling disabled
- a99c7ad: fix: use default rather than import specifier for better error message in CJS projects
- Updated dependencies [a99c7ad]
- imagetools-core@4.0.3
- 815650a: fix: support
node16andnodenextvalues for TypeScript'smoduleResolutionsetting - Updated dependencies [75160ef]
- Updated dependencies [815650a]
- imagetools-core@4.0.2
- a6fa0fb: fix: account for possibility of all provided dimensions being upsizes
- 53af8fc: fix: reduce logging when providing larger image dimension via defaultDirectives
- bf391fd: fix: don't generate multiple images at same dimensions
- Updated dependencies [53af8fc]
- imagetools-core@4.0.1
- 45cf457: breaking: removed shorthands (e.g. webp as a standalone query parameter). You must now specify the full
format= - 10ca129: breaking: drop CJS support
- 36beecb: breaking: remove width, height, and ar directive aliases. Use w, h, and aspect instead
- 45cf457: breaking: simplify ability to provide defaults. Output format is now specified with
as=
- Updated dependencies [45cf457]
- Updated dependencies [022519c]
- Updated dependencies [10ca129]
- Updated dependencies [36beecb]
- Updated dependencies [022519c]
- Updated dependencies [861276f]
- Updated dependencies [45cf457]
- Updated dependencies [861276f]
- imagetools-core@4.0.0
- 4306ad7: feat: allow
asyncoutput formats - c1c49c1: fix: don't match extensions in query string
- 22f2ff1: fix: support URL with scheme in base option
- 6459cf6: fix: ensure leading slash in generated URL
- c64e7ef: chore: upgrade typescript
- 93bc23a: fix: log messages through Vite and Rollup. Allows the log level to be set with
logLevelandonwarnrespectively. - 6291c71: fix: support Vite's
baseconfig - Updated dependencies [c64e7ef]
- Updated dependencies [93bc23a]
- Updated dependencies [04bd2a0]
- imagetools-core@3.3.1
- d43bfff: fix: list types exports first
- Updated dependencies [e7efc22]
- imagetools-core@3.3.0
- e154d09: fix: revert bundling of imagetools-core
- 425867f: Bundle imagetools-core
- dbc8d02: Fix type resolution by re-adding top-level types field
- Updated dependencies [dbc8d02]
- imagetools-core@3.2.3
- 92b2fa3: chore(deps): update dependency @types/sharp to ^0.31.0
- 07df0fa: fix: process URLs with no query string
- 80250db: Update package READMEs and metadata.
- d11b927: Let vite create correct paths in build result
- 60890de: fix: add an exports map
- Updated dependencies [92b2fa3]
- Updated dependencies [80250db]
- Updated dependencies [60890de]
- imagetools-core@3.2.2
- ca40b8b: chore(deps): update dependency sharp to ^0.31.0
- Updated dependencies [ca40b8b]
- imagetools-core@3.2.1
- Updated dependencies [45b35da]
- imagetools-core@3.2.0
- Updated dependencies [ea4ab8f]
- imagetools-core@3.1.1
- Updated dependencies [6f93aaf]
- imagetools-core@3.1.0
- 7efa2dc: Correctly merge directives when
defaultDirectivesis a function. - cb679f5: fixes the conditional reveal of metadata when using
defaultDirectives. - 7efa2dc: Allow directives specified in URLs to override default directives
- b551792: Update to
vitev3.
- Updated dependencies [7a75a6f]
- imagetools-core@3.0.3
- 725e27b: chore(deps-dev): bump vite from 2.7.2 to 2.7.3
- 64356e6: chore(deps-dev): bump sharp from 2.8.2 to 2.9.3
- Updated dependencies [64356e6]
- imagetools-core@3.0.2
- 922975e: chore(deps-dev): bump vite from 2.6.14 to 2.7.1
- e6ed3a8: re-add cloned image fix that got lost during merging
- e58e2cb: Remove
iccmetadata whenremoveMetadatais set to true. - Updated dependencies [e58e2cb]
- imagetools-core@3.0.1
- f6cec96: change
defaultDirectivesfromRecord<string,string>toURLSearchParams, to align with in-code interface and to allow for multiple entries of key with multiple values
- fb767da: chore(deps-dev): bump vite from 2.6.7 to 2.6.14
- 1655877: Fix path to typings
- f85ffe8: Bump @rollup/pluginutils
- Updated dependencies [f6cec96]
- imagetools-core@3.0.0
- 73955f4: feat: allow override of resolveConfigs
- 76e9a4d: fix: clone sharp image in vite plugin to avoid reuse issue
- dc60a68: Add
imageproperty on the metadata object.
- dc60a68: Update vite to
2.6.7and rollup to2.58.0
- c70b97e: Add metadata whitelist
- Updated dependencies [c70b97e]
- imagetools-core@2.8.0
- d1a3058: chore(deps-dev): bump vite from 2.3.2 to 2.3.4
- 7c485aa: chore(deps-dev): bump vite from 2.3.0 to 2.3.2
All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
3.6.6 (2021-05-11)
Note: Version bump only for package vite-imagetools
3.6.5 (2021-05-11)
Note: Version bump only for package vite-imagetools
3.6.4 (2021-05-11)
Note: Version bump only for package vite-imagetools
3.6.3 (2021-05-11)
Note: Version bump only for package vite-imagetools
3.6.2 (2021-05-11)
Note: Version bump only for package vite-imagetools
3.6.1 (2021-05-07)
Note: Version bump only for package vite-imagetools
3.6.0 (2021-05-07)
- Allow # symbols in src urls (b5beedd)
3.5.4 (2021-05-07)
Note: Version bump only for package vite-imagetools
3.5.2 (2021-05-03)
Note: Version bump only for package vite-imagetools
3.5.1 (2021-05-03)
3.5.0 (2021-04-28)
3.4.4 (2021-04-28)
Note: Version bump only for package vite-imagetools
3.4.3 (2021-04-28)
Note: Version bump only for package vite-imagetools
3.4.2 (2021-04-28)
- exclude test files from generated types (a86d29c)
- vite-imagetools: Add a more helpful error message when no images could be generated during dev mode (e62b1bb)
3.4.1 (2021-04-28)
- exclude test files from generated types (a86d29c)
- vite-imagetools: Add a more helpful error message when no images could be generated during dev mode (e62b1bb)
Note: Version bump only for package vite-imagetools
3.4.0-next.7 (2021-04-11)
3.4.0-next.6 (2021-04-11)
3.4.0-next.5 (2021-04-11)
3.4.0-next.4 (2021-04-09)
3.4.0-next.3 (2021-04-06)
- mark force option as deprecated (23b0aef)
- add rollup integration (2fd9ca7)
3.4.0-next.2 (2021-04-05)
Note: Version bump only for package vite-imagetools
3.4.0-next.1 (2021-03-30)
Note: Version bump only for package vite-imagetools
3.4.0-next.0 (2021-03-30)
- support nodejs LTS versions (4abccc5), closes #51
- update cache key geneartion to match spec (7f0a0e8)
- allow metadata removal to be toggled by option (5d0c781)
3.3.2-alpha.0 (2021-03-30)
3.3.1 (2021-03-19)
3.3.0 (2021-03-16)
3.2.6 (2021-03-15)
Note: Version bump only for package vite-imagetools
3.2.5 (2021-03-15)
Note: Version bump only for package vite-imagetools
3.2.4 (2021-03-15)
Note: Version bump only for package vite-imagetools
3.2.3 (2021-03-15)
Note: Version bump only for package vite-imagetools
3.2.2 (2021-03-15)
Note: Version bump only for package vite-imagetools
3.2.1 (2021-03-15)
Note: Version bump only for package vite-imagetools
- improve extensibility (61d5a3d)
- reflect new imagetools-core version (f5135b7)
- remove force option (9f04c9c)
- add output formats (70cd9cd)
- Revert "Publish" (c0186f1)