sveltejs / sveltejs/kit

Cannot use `read` with images processed by enhanced-img

Open
#16,585 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pkg:enhanced-img
Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the bug

images processed by enhanced-img have a URL of /@imagetools/<hash> during dev. read can't really read this because that path doesn't exist on disk if the read implementation uses the filesystem. See https://github.com/sveltejs/kit/pull/16464/changes#r3677799063

I have a feeling that this should be fixed in enhanced-img/image-tools because I don't know if SvelteKit can know where the user has configured their imagetools cache path (which is where the file is stored) although we don't currently allow configuring it.

Severity

serious, but I can work around it

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing SvelteKit's filesystem-based read implementation and compare it with the /@imagetools/<hash> URL produced by enhanced-img during development. Investigate enhanced-img/image-tools and the imagetools cache path to establish which project owns the fix. Done means these processed images can be read in dev, with the ownership and expected cache behavior made explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.