Currently my group runs a meteor app with hundreds of thousands of images that are all very large full size. We should have done this a long time ago but we are in need of a way to optimize them to help loading times. I’m looking for a solution to be able to save the image in several sizes when the user uploads it from our app (ex: full-size, medium, thumbnail) and also auto rotate and allow user to rotate. We use Amazon S3 to host all of our images. We also need a way to convert all of the existing images into these size formats from server side.
I tried implementing something a while back and it was unsuccessful. I set up imagemagick on our server but had trouble getting this to work in production because the image was being saved temporarily on server memory to process but this was causing crashes because of limited amount of memory. I have little experience with this kind of thing.
My second thought was to use HTML canvas to resize the images. This would work, I think, for newly uploaded images. But I am still searching for a way to process the existing images as well.
I have considered:
Maybe AWS has a built in way to process them. I wouldn’t mind doing it that way.
Some sort of Meteor/node package that can help with this.
Setting up another server just to process images.
Using some third party image processing.
If someone can give me some advice so I can get the ball rolling that would be so helpful!