Best way to store images


#1

I am making a note app and I am trying to figure out what would be the best way to allow users to upload photos to the mongo database. I figured the best way would be to request the imageURL and store it as a string. But what if the image is not from the internet, what would be the most effective way of storing an image in the DB from a file input? Is there a way to somehow get the imageURL of the uploaded image in file input? I prefer imageURL’s just because they are easier to work with and I can put it into my app easily. If not, what would be a way to do it? I know collectionfs has an image/file storing feature, but I am pretty sure images take up a lot of space and having to render all the large documents would be very slow. Please leave me any possible solutions to my problem and btw im a beginner at meteor so please explain thoroughly. Thanks!


#2

Probably the simplest way is to use a third party image-as-a-service provider like Cloudinary.

Here’s an example system I created to show how to interface Meteor with Cloudinary. It is very simple to do:

Your collection just stores the URL, the image itself is stored at Cloudinary.

Good luck!


#3



#4

I’ve been using:

Uploadcare — Smart CDN combining cloud storage and upload widget.

It’s super simple to setup with the uploadcare:uploadcare-widget package which provides the upload widget. They also have CDN that gives you simple to use image processing functionality.

Uploadcare is a service handling CDN, cloud storage, file uploads & hosting, image upload & processing — all in one secure solution with a powerful upload widget.