From d441b2ca4b1f4a8f620fa5cd8f936d4f09075dc5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 13 Sep 2026 15:57:44 +0000 Subject: [PATCH] chore: release --- .changeset/bright-foxes-order.md | 9 ---- .changeset/calm-owls-blur.md | 7 ---- .changeset/lucky-moons-repeat.md | 17 -------- .changeset/olive-pugs-invite.md | 11 ----- .changeset/quiet-hats-sit.md | 17 -------- .changeset/soft-donkeys-repeat.md | 9 ---- .changeset/swift-owls-cache.md | 13 ------ CHANGELOG.md | 68 +++++++++++++++++++++++++++++++ package.json | 2 +- 9 files changed, 69 insertions(+), 84 deletions(-) delete mode 100644 .changeset/bright-foxes-order.md delete mode 100644 .changeset/calm-owls-blur.md delete mode 100644 .changeset/lucky-moons-repeat.md delete mode 100644 .changeset/olive-pugs-invite.md delete mode 100644 .changeset/quiet-hats-sit.md delete mode 100644 .changeset/soft-donkeys-repeat.md delete mode 100644 .changeset/swift-owls-cache.md diff --git a/.changeset/bright-foxes-order.md b/.changeset/bright-foxes-order.md deleted file mode 100644 index 9db5d35..0000000 --- a/.changeset/bright-foxes-order.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@solidjs/image": minor ---- - -The default output is now WebP and JPEG. The old default listed PNG first, so every browser downloaded PNG, the largest format for photos. - -Formats are now offered smallest first, whatever order `output` lists them in. The `img` falls back to JPEG or PNG, which every browser reads. - -A transparent image gets PNG in place of JPEG, so its transparent pixels are no longer painted black. An opaque image drops PNG when JPEG is also listed. diff --git a/.changeset/calm-owls-blur.md b/.changeset/calm-owls-blur.md deleted file mode 100644 index 79c6e2d..0000000 --- a/.changeset/calm-owls-blur.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@solidjs/image": minor ---- - -Add an opt-in BlurHash preview. Set `placeholder: { type: "blurhash" }` in the plugin and install `blurhash`, which is an optional peer dependency. The number of components is picked per image from its aspect ratio, so there is nothing else to configure. - -The server paints the average color of the image, and the browser decodes the hash into a blur. Remote images can return `{ hash, color }` from `transformURL` and get the same preview. diff --git a/.changeset/lucky-moons-repeat.md b/.changeset/lucky-moons-repeat.md deleted file mode 100644 index f1541f7..0000000 --- a/.changeset/lucky-moons-repeat.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"@solidjs/image": minor ---- - -The `img` now carries a `srcset` of the last output format, so a browser that supports none of the `source` formats still picks a sized variant. It used to fall back to the full size original. - -The original image is no longer imported. `src.source` points at the largest variant of the fallback format, so the untouched original never reaches the bundle. - -Processed images go through the bundler on build, so `base`, `assetsDir` and the build manifest now apply to them. The dev server still writes them to the public directory. - -Encoded images are now cached between builds in the Vite cache directory, so a build only encodes images that changed. - -`sizes` now reaches the `img` as well as every `source`, since the `img` carries its own `srcset`. - -`SolidImage` takes an `eager` prop for the image above the fold. It loads right away instead of waiting for the observer, and the server renders it in full so the browser finds it while parsing the page. - -Readers with no JavaScript now get the image. The server renders a `noscript` copy alongside the lazy one. diff --git a/.changeset/olive-pugs-invite.md b/.changeset/olive-pugs-invite.md deleted file mode 100644 index f79122a..0000000 --- a/.changeset/olive-pugs-invite.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@solidjs/image": minor ---- - -Local images now ship an inline preview. The plugin emits a downscaled copy as a data URL plus the dominant color, and the component paints it behind the image until it loads. Turn it off with `placeholder: false`. - -`SolidImage` takes a `sizes` prop, which is forwarded to every `source`. Without it the browser assumes the image spans the full viewport width and downloads a larger variant than it needs. - -The `fallback` prop is now optional. Leave it out and the image is revealed as soon as it loads. - -Processed images are cached. The file name now covers the source file, the format, the width and the quality, and an existing file is reused instead of encoded again. Changing the quality no longer serves a stale image. diff --git a/.changeset/quiet-hats-sit.md b/.changeset/quiet-hats-sit.md deleted file mode 100644 index 8b9864f..0000000 --- a/.changeset/quiet-hats-sit.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"@solidjs/image": minor ---- - -Images are no longer enlarged. Sizes wider than the source are dropped and the source width is used instead, so `srcset` only lists real widths. - -Photos are turned upright using their EXIF orientation, and their reported width and height match how they display. - -Animated images keep every frame when the output is WebP. Other formats keep the first frame instead of stacking every frame into one image. - -JPEG files are smaller at the same quality, and WebP and PNG are compressed harder. The extra encoding time is only paid once, since results are cached. - -The build cache now keys on file content instead of modification time, so it still hits after a fresh checkout in CI. - -`publicPath` now defaults to Vite's public directory, so processed images are reachable on the dev server without setting it. - -Every `img` now carries its intrinsic `width` and `height`, and the `noscript` copy uses `loading="lazy"`. diff --git a/.changeset/soft-donkeys-repeat.md b/.changeset/soft-donkeys-repeat.md deleted file mode 100644 index d07b537..0000000 --- a/.changeset/soft-donkeys-repeat.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@solidjs/image": patch ---- - -Images now load. The `img` element receives the source, and the broken `source` element that was rendered without a transformer is gone. - -The shipped stylesheet now matches the rendered markup. Elements are tagged with `data-solid-image` instead of `data-start-image`. - -The default image quality is now 80. It was 0.8, which sharp rejects. The `quality` option is now optional. diff --git a/.changeset/swift-owls-cache.md b/.changeset/swift-owls-cache.md deleted file mode 100644 index 3082dbc..0000000 --- a/.changeset/swift-owls-cache.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@solidjs/image": minor ---- - -AVIF now encodes at quality 50 by default, and other formats at 80. AVIF reaches similar visual quality at a lower number, and the old shared default of 80 made AVIF files several times larger. `quality` also accepts an object to set formats one by one. - -Cached files now carry a pipeline version, so a plugin update that changes encoding does not reuse old files. Previews are cached on disk like the variants, each image's file and metadata are read once per build, and cached files unused for a week are removed at startup. - -GIF is now a supported input and is processed by default. Animated GIFs keep every frame when the output is WebP or GIF. - -An eager image is now preloaded from the head and gets a high fetch priority. Lazy images decode asynchronously by default. Props that are set still win. - -Image processing is capped at the number of CPU cores at once. Set `concurrency` to change it. diff --git a/CHANGELOG.md b/CHANGELOG.md index 16f1e73..66a5699 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,73 @@ # @solidjs/image +## 0.2.0 + +### Minor Changes + +- 3b00d0b: The default output is now WebP and JPEG. The old default listed PNG first, so every browser downloaded PNG, the largest format for photos. + + Formats are now offered smallest first, whatever order `output` lists them in. The `img` falls back to JPEG or PNG, which every browser reads. + + A transparent image gets PNG in place of JPEG, so its transparent pixels are no longer painted black. An opaque image drops PNG when JPEG is also listed. + +- f6bdade: Add an opt-in BlurHash preview. Set `placeholder: { type: "blurhash" }` in the plugin and install `blurhash`, which is an optional peer dependency. The number of components is picked per image from its aspect ratio, so there is nothing else to configure. + + The server paints the average color of the image, and the browser decodes the hash into a blur. Remote images can return `{ hash, color }` from `transformURL` and get the same preview. + +- 6165dc7: The `img` now carries a `srcset` of the last output format, so a browser that supports none of the `source` formats still picks a sized variant. It used to fall back to the full size original. + + The original image is no longer imported. `src.source` points at the largest variant of the fallback format, so the untouched original never reaches the bundle. + + Processed images go through the bundler on build, so `base`, `assetsDir` and the build manifest now apply to them. The dev server still writes them to the public directory. + + Encoded images are now cached between builds in the Vite cache directory, so a build only encodes images that changed. + + `sizes` now reaches the `img` as well as every `source`, since the `img` carries its own `srcset`. + + `SolidImage` takes an `eager` prop for the image above the fold. It loads right away instead of waiting for the observer, and the server renders it in full so the browser finds it while parsing the page. + + Readers with no JavaScript now get the image. The server renders a `noscript` copy alongside the lazy one. + +- 52c7b8c: Local images now ship an inline preview. The plugin emits a downscaled copy as a data URL plus the dominant color, and the component paints it behind the image until it loads. Turn it off with `placeholder: false`. + + `SolidImage` takes a `sizes` prop, which is forwarded to every `source`. Without it the browser assumes the image spans the full viewport width and downloads a larger variant than it needs. + + The `fallback` prop is now optional. Leave it out and the image is revealed as soon as it loads. + + Processed images are cached. The file name now covers the source file, the format, the width and the quality, and an existing file is reused instead of encoded again. Changing the quality no longer serves a stale image. + +- 196c88c: Images are no longer enlarged. Sizes wider than the source are dropped and the source width is used instead, so `srcset` only lists real widths. + + Photos are turned upright using their EXIF orientation, and their reported width and height match how they display. + + Animated images keep every frame when the output is WebP. Other formats keep the first frame instead of stacking every frame into one image. + + JPEG files are smaller at the same quality, and WebP and PNG are compressed harder. The extra encoding time is only paid once, since results are cached. + + The build cache now keys on file content instead of modification time, so it still hits after a fresh checkout in CI. + + `publicPath` now defaults to Vite's public directory, so processed images are reachable on the dev server without setting it. + + Every `img` now carries its intrinsic `width` and `height`, and the `noscript` copy uses `loading="lazy"`. + +- ad3867c: AVIF now encodes at quality 50 by default, and other formats at 80. AVIF reaches similar visual quality at a lower number, and the old shared default of 80 made AVIF files several times larger. `quality` also accepts an object to set formats one by one. + + Cached files now carry a pipeline version, so a plugin update that changes encoding does not reuse old files. Previews are cached on disk like the variants, each image's file and metadata are read once per build, and cached files unused for a week are removed at startup. + + GIF is now a supported input and is processed by default. Animated GIFs keep every frame when the output is WebP or GIF. + + An eager image is now preloaded from the head and gets a high fetch priority. Lazy images decode asynchronously by default. Props that are set still win. + + Image processing is capped at the number of CPU cores at once. Set `concurrency` to change it. + +### Patch Changes + +- 1d68da6: Images now load. The `img` element receives the source, and the broken `source` element that was rendered without a transformer is gone. + + The shipped stylesheet now matches the rendered markup. Elements are tagged with `data-solid-image` instead of `data-start-image`. + + The default image quality is now 80. It was 0.8, which sharp rejects. The `quality` option is now optional. + ## 0.1.0 ### Minor Changes diff --git a/package.json b/package.json index d05ce1d..74aef85 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@solidjs/image", - "version": "0.1.0", + "version": "0.2.0", "description": "Optimized image components and Vite tooling for Solid.", "type": "module", "license": "MIT",