Uploading user images to s3 and generating thumbnails from node Uploading user images to s3 and generating thumbnails from node express express

Uploading user images to s3 and generating thumbnails from node


Why don't you just use something like Filepicker.io to handle uploading and hosting images and simply store the image unique url (given to you by filepicker in the callback)?Thumbnails can also be dynamically generated by Filepicker (using simple url modifications).

Cloudinary is a nicer alternative to filepicker when it comes to images, but integration process will be messier.


I would store the images on the filesystem, not in a database. If you have a unique id, you can use that as part of the url, for example an id of the item the image belongs to. Might look like this:

./uploads/img-<id>-<size>.jpg

You can write to disk and resize if necessary with node-imagemagick and your cdn should just poll these images from time to time. Not exactly sure how that part would work in terms of including the url to the image in the html.