enhanced-img: Support configuring vite-imagetools (e.g. `removeMetadata=false`)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the problem
I would like to keep the exif metadata information stored in my images, but when using enhanced-img, these are removed by-default.
vite-imagetools supports removeMetadata which is true by default (which I think is a good default).
Describe the proposed solution
accept a list of options in
https://github.com/sveltejs/kit/blob/42c8bf390a14ff18f604ae444d0f7a15c76ce911/packages/enhanced-img/src/index.js#L9
that might be passed into vite-imagetools:
https://github.com/sveltejs/kit/blob/42c8bf390a14ff18f604ae444d0f7a15c76ce911/packages/enhanced-img/src/index.js#L64-L66
You might not want to just accept all options and just blindly pass them to vite-imagetool, but maybe a list of sensible parameters might make sense.
Alternatives considered
I couldn't find any alternative while sticking with sveltejs/enhanced-img.
I'd need to switch to another package
Importance
nice to have
Additional Information
Remeber to delete node_modules/.cache/imagetools, when testing the removeMetadata option.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/enhanced-img/src/index.js, especially the option definition around line 9 and the vite-imagetools invocation around lines 64–66. Determine how the configured option should reach vite-imagetools, then remove node_modules/.cache/imagetools and verify that setting removeMetadata=false preserves image metadata.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, vite
- Domain
- frontend, tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100