Jump to content

Databases and Images


ririe44

Recommended Posts

What is the best way to deal with images in databases?  I've never dealt with images and databases yet...

 

From what I understand, you can upload images into a database, as a blob?  What's the difference between largeblobs, blobs, and smallblobs?

 

Is that actually the best way to work with them, or can you somehow put a reference in the field to the image which is stored elsewhere?

 

So, I'm creating an image gallery, in the table I will have a thumbnail image, and when you click on it, the bigger one will show up.  How can I add a link to the contents of an image field?

 

Thanks everyone!

Link to comment
https://forums.phpfreaks.com/topic/147070-databases-and-images/
Share on other sites

Yes you can store images as a blob, the only differences are the maximum size - Read more here.

 

What I usually do is store the images in a directory and just store the path to the images wherever necessary in the database.  So that you just have to store the images once, saving a lot of space.

Link to comment
https://forums.phpfreaks.com/topic/147070-databases-and-images/#findComment-772103
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.