Ability to provide options to Sharp operations
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.5k
- Forks
- 93
- PR merge metrics
- No merged PRs in 30d
Description
Describe the feature
I've found myself wanting to use IPX to transform the image format & wanting to supply options, e.g. process an animated gif by reducing the colour count (and therefore size), which is supported by Sharp but I have no interface for supplying these arguments to modifiers.
I totally understand if Sharp output options are out of scope but spitballing here, a path API for Sharp operation options could look like this:
/f_gif[colours:16|dither:0.5|reuse:true]/buffalo.png --> .gif({ colours: 16, dither: 0.5, reuse: false })
/rotate_45[background:00ff00]/buffalo.png --> .rotate(45, { background: '00ff00' })
Additional information
- Would you be willing to help implement this feature?
Contributor guide
No contributing guide indexed for this repository
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 by tracing how modifiers are represented and passed to Sharp, then compare that path with the GIF and rotate option examples in the issue. Decide the supported option syntax and scope before implementation; done means the chosen options can be supplied through modifiers and are covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100