This project aims to help you resize images in your own app, or even just use this one when you have one or two images you’d like to resize and scale down. Being able to do this also shows how to deal with file uploads (with forms of enctype=“multipart/form-data”), saving them on the server using the ExpressJS ‘multer’ middleware, as well as doing the image processing using ‘sharp’.
One other cool thing is the ability to preview the image in the page once it has already been selected using the file input. This uses the File API in the browser to achieve this.
Future plans include being able to specify other ways of resizing, such as fixed width (prototype done), fixed height, scale, stretch, letterbox, and percentage. Other ideas welcome.
Any feedback welcome and I’d love you to have a try, look at the source, and remix it.
This is the first complete app I’ve done since I started with Glitch last week, with a few more on the way soon. I’ll update this topic with blog posts once I have written them up.