Skip to content

fix: no upscaling, EXIF rotation, content cache key, encoder tuning - #7

Merged
lxsmnsyc merged 1 commit into
mainfrom
image-pipeline-fixes
Sep 13, 2026
Merged

fix: no upscaling, EXIF rotation, content cache key, encoder tuning#7
lxsmnsyc merged 1 commit into
mainfrom
image-pipeline-fixes

Conversation

@lxsmnsyc

Copy link
Copy Markdown
Member

Summary

Stops the plugin from enlarging images, turns photos upright, and makes the
build cache hit in CI. Also tunes the encoders, keeps animated WebP frames, and
fixes the dev server default for publicPath.

Changes

  • Images are never enlarged. Sizes wider than the source are dropped and the
    source width is used instead, so srcset only lists real widths.
  • The img fallback source uses the largest real width, not the largest
    configured size.
  • Photos are turned upright using their EXIF orientation. The reported width and
    height match how the photo displays, so the aspect ratio box is correct.
  • The inline preview is turned upright too.
  • Animated images keep every frame when the output is WebP. AVIF, JPEG and PNG
    keep the first frame. With animation turned on, sharp stacks every frame into
    one tall image in those formats.
  • JPEG uses mozjpeg and is smaller at the same quality. WebP uses its highest
    effort.
  • PNG is compressed harder and stays lossless. The quality option never
    applied to PNG, and the README now says so.
  • The cache key hashes the file content instead of the modification time. A
    fresh checkout gives every file a new time, so the cache never hit in CI.
  • The cache key leaves out the file path, which also differs between checkouts.
  • publicPath defaults to Vite's publicDir. The old default of dist is not
    served by the dev server, so images 404ed unless publicPath was set.
  • Every img carries its intrinsic width and height.
  • The noscript image uses loading="lazy", so readers with no JavaScript do
    not download every image at once.

@pkg-pr-new

pkg-pr-new Bot commented Sep 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/image@7

commit: 3b27cb3

@lxsmnsyc
lxsmnsyc merged commit 196c88c into main Sep 13, 2026
5 checks passed
@lxsmnsyc
lxsmnsyc deleted the image-pipeline-fixes branch September 13, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant