[image-transform] Unable to define better image quality than default
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 134
- Forks
- 87
- Avg merge
- 12m
- Merged PRs (30d)
- 25
Description
you should allow to define image quality, sharp does have options.quality option, default is 80 and graphic blogs need maximum quality
https://sharp.pixelplumbing.com/api-output#parameters-7
https://ghost.org/docs/themes/assets/
// package.json
"config": {
"image_sizes": {
"xxs": {
"width": 30,
"quality": 100
},
"xs": {
"width": 100,
"quality": 100
},
"s": {
"width": 300,
"quality": 100
},
"m": {
"width": 600,
"quality": 100
},
"l": {
"width": 1000,
"quality": 100
},
"xl": {
"width": 2000,
"quality": 90
}
}
}
it looks like, that this simple option add will enable new quality option
...imageDimensionConfig
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/image-transform/lib/transform.js at line 102 and inspect how imageDimensionConfig is passed to the image transformation. Compare the available sharp quality option with the Ghost image_sizes configuration example and verify how quality values flow through the SDK. Done means callers can define per-size quality rather than always using sharp's default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100