Reputation: 27
I'm wondering how could I go about storing images to a database. Is there a way to store the actual image to a sql or nosql database and then just query the image or would I need to only send the path of a image and then store all images in a folder and direct the image tag to that image. Is there any technologies that will allow me to put the actual image in the cloud and make a get call to it?
Upvotes: 0
Views: 716
Reputation: 1663
Some general direction: If you are already using a SQL database, don't want to change the database architecture, and everything else about that database is fine - then you may want to use a few option (remember this is if you are not used a NoSQL DB):
If you are using a NoSQL then storing compressed images in your database may be fine. Some thing to keep in mind:
There are many other practices to keep in mind when choosing. I personally would use some cloud service to reference a static URL that links to my images. This creates a bit more portability and reduces the total size of the table greatly. Check out this discussion for some more details.
Upvotes: 2