Upgrade sharp to 0.33.4
This appears to be an issue with https://github.com/lovell/sharp/issues/4163 with pre-built binaries
I think this might be due to the overly-restrictive peerDependencies of the smartcrop-sharp dependency - see https://github.com/jwagner/smartcrop-sharp/pull/32
If you weren't already aware, sharp provides a smartcrop feature via a position of "entropy" or "attention".
await sharp(input).resize({ width, height, position: "entropy" })...
https://sharp.pixelplumbing.com/api-resize#resize
Thanks @lovell (and thanks for the great library!). Might be a good idea for us to reduce our dependencies here if the behaviour is equivalent.
I'm not sure to the extent we're using smart cropping, or what the impact of switching would be; the only mention of it in tachyon-plugin in the docs, albeit we appear to be using it in smart-media for resizes (but not crops).
@roborourke Any insight on this?
The behaviour isn’t equivalent unfortunately or I would agree on reducing dependencies. The smartcrop-sharp library is a wrapper around https://github.com/jwagner/smartcrop.js so we could perhaps switch to using that directly instead to avoid the extra dependency.
The smartcrop.js results are generally better in my testing than entropy or attention especially when it comes to faces and people which is why I implemented it in Tachyon and used it as the default in Altis.