I am looking for a node package that handles file attachments and image resizing. Something similar to the paperclip and carrierwave gems.
NodeJS – Resize() is an inbuilt function that is used to resize the images to the desired size. We can use resize to set the height and width using a 2-pass bilinear algorithm. It can resize an image into any size as declared by the user. We can take input from the user or resize it into fixed Width*Height size.
sharp is a popular Node. js image processing library that supports various image file formats, such as JPEG, PNG, GIF, WebP, AVIF, SVG and TIFF. In this tutorial, you'll use sharp to read an image and extract its metadata, resize, change an image format, and compress an image.
Did you search the Node Modules Wiki Page? I searched for "upload" and found 2 candidates.
https://github.com/felixge/node-formidable
https://github.com/rootslab/formaline
For image resizing, gm or node-imagemagick will probably suffice.
For image upload and resize, you can check papercut,
which is simular to carrierwave.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With