Closed SDaron closed 5 years ago
Testing this deeply, this error is due to the sharp version in the npm which is 0.17.0 in your latest release instead of 0.21.0. Could you consider updating the sharp version in npm repository to 0.21.0?
There have been problems with 0.20.0 of sharp why I didnt't do it back then. Will have a look now :)
New release is out. Should be fixed now. Can you confirm?
Thanks for upgrading, but unfortunately any attempt to upgrade to the version 2.2.0 gives me now a Metalsmith error
Metalsmith · failed to require plugin "metalsmith-sharp".
I've tried deleting nodes_modules and with a fresh install without success.
For information I was able to fix the sharp version temporarly using yarn instead of npm and with resolutions:
"dependencies": {
"metalsmith-sharp": "^2.1.1",
},
"resolutions": {
"metalsmith-sharp/sharp": "^0.21.1"
},
Ooops! 2.2.1 should fix it :)
Yes, everything works fine now! Thanks
I'm trying without success to use the resize method with custom options. This version is just ignored:
And with an object in args I receive the following error:
So it seems sharp doesn't accept an object, however, according to the sharp documentation, this should be acceptable set of options. How can I set these options so the images are no wider and no higher than 200 pixels, without cropping and no larger than the input image? Looking into your code, it should work so maybe I'm missing something obvious... Thanks for your help.