Image Resize App

Project URL : https://glitch.com/~image-resize
Site URL : https://image-resize.glitchapps.org/

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.

4 Likes

Hi again to everyone who liked this app.

I’ve done an initial (draft) write-up of the main aims and takeaways of the app. So far, each app I have done on Glitch (more forthcoming) try and test out something related to both Node.js and the Glitch platform. There are a few little tidbits of info scattered inside this post:

As an interesting side note, I managed to upload a 50MB image of 20,000 x 20,000 pixels to the app (via the image-resize.glitch.me URL - since I’m limiting the request body to 10MB via my proxy) and resized it down to 640 wide. I didn’t expect it to work, both for upload size - or processing required - but it not only worked but was really fast too.

Well done Glitch! :smile_cat:

(And yes, the blog linked to above is also hosted on Glitch.)

1 Like

I just thought I’d ping this thread and ask if there was anything else I needed to do to ‘submit’ this app to the Gallery? I thought it might just be the original post but that doesn’t seem to have done it after having a quick search for https://glitch.com/search?q=image

(I’m assuming it would be ‘accepted’ and if not, that’s okay, so just an negative-ack would be fine.)

Many thanks.

Just updated the app so you can now choose either a width or height or both.

I’m going to just keep chipping away at the features mentioned above when I get time. Hope you all like it.

1 Like