sharp icon indicating copy to clipboard operation
sharp copied to clipboard

Reduce Node Module Size

Open dillonsvincent opened this issue 6 years ago • 2 comments

What are you trying to achieve? I'd like to know if there is someway to reduce the package size. I'm using sharp in an aws lambda and sharp being 33mb is my largest module. It looks like most of the space is from the vendor folder, can I remove that?

dillonsvincent avatar Feb 12 '20 05:02 dillonsvincent

To reduce/remove the vendor folder, you'll need to provide your own libvips:

https://sharp.pixelplumbing.com/install#custom-libvips https://sharp.pixelplumbing.com/install#custom-prebuilt-binaries

lovell avatar Feb 12 '20 20:02 lovell

I hope this information helped. Please feel free to re-open with more details if further assistance is required.

lovell avatar Feb 26 '20 18:02 lovell