Closed VitaliyR closed 5 years ago
What about quality parameter for sharp? What do you think about either to add a possibility to let pass anything to a sharp processor or, at least, add parameter attribute?
Sounds good! PR welcome!
Is this still being maintained?
Yes this is being maintained. I just haven't bothered making a major version bump to use the latest sharp
& p-event
dependencies.
@derhuerst I can try to do that if you want. Should I just add quality
option for resolving this issue? Or you prefer to update the sharp dep? In case of update - should I remain API of this plugin to be the same? Because if you want to bump major version, I think, it is acceptable to change API a little
Should I just add
quality
option for resolving this issue?
Let's do that: an optional parameter.
AFAICT, with the sharp
API, applying the quality
value without specifying a format
is not possible (which is reasonable because the same value implies different visual quality with e.g. JPEG & WebP), so I propose to ignore quality
if format
is not given.
Or you prefer to update the sharp dep?
We can add this change as a non-breaking change, so let's do it separate from the sharp
upgrade.
Because if you want to bump major version, I think, it is acceptable to change API a little
What would you like to change?
PR: #13 I've decided to let developers decide what to pass to sharp. toFormat is expecting options, and, under the hood is just passing them to an appropriate format method. For instance, the quality parameter is supported for webp and jpeg formatters, but for png, you need to pass other.
What would you like to change?
I saw that sharp in next minor version has removed a lot of deprecations, that's why I've asked about changing the API, but nevermind :)
Thanks! Published as gulp-scale-images@1.2.0
.
Hello!
What about quality parameter for sharp? What do you think about either to add a possibility to let pass anything to a sharp processor or, at least, add parameter attribute?
P.S. Is this still being maintained?