Closed davidpmccormick closed 1 year ago
Just realised I can include a sharpOptions
block in the config. Sorted. Maybe it should get a mention in the README?
Actually I don't think the image compression issue is a problem with the output pngs in any event, but with some downsampling by the service I'm using to render them.
Cheers
Thanks for reporting! sharpOptions
is totally missing in the docs, I will add it!
But compressionLevel
shouldn't change anything about sharpness of PNGs, as PNGs are lossless. It's more about speed and resulting file size. Did it change something for you?
I couldn't see any changes – I think the issue is maybe with some downsampling where it's being used. Or maybe I'm being too fussy!
sharpOptions
are now documented via https://github.com/KiwiKilian/eleventy-plugin-og-image/commit/c46bd840d21500317dd8a810093539f725372a81.
I also experimented a bit with the sharpness and different options of resvg-js and sharp – there is nothing to actually improve anymore. Output on https://og-playground.vercel.app/ looks equally crisp on same resolutions.
The images look a bit less crisp than I'd like. I see that the default
Sharp
png compression is 6 (out of 9) – is that what's used here? Is there an option to change it?Thanks!