A blob image

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
wpsd2006
Forum Commoner
Posts: 66
Joined: Wed Jan 07, 2009 12:43 am

A blob image

Post by wpsd2006 »

Somebody might have post this ? let me know

I wondering what's the advantage and disadvantage to store image in the mysql ( blob data )
will it make image load faster or maybe other things ?

Now i developing a property website and it has a lot of image there
Is there a way to make image load faster ( for 1MB internet speed user ) ?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: A blob image

Post by s.dot »

I can't think of a single good reason to store an image in a database. Store the location of the image on the hard drive in the database. That's all that's needed.

Load faster... hmm, thumbnails always work. ;)

Perhaps some super ninja connection speed analyzer to tell your script which image to load, but that is beyond the scope of anything I've done. Perhaps send a 1mb image and time how long it takes to deliver. Make your assumptions based on that..

.. or stick with thumbnails. :P
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: A blob image

Post by pickle »

The only advantage is that you only have to worry about database records, not database records AND files. However, the speed decrease of putting images in the database far outweighs any possible advantage.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: A blob image

Post by josh »

wpsd2006 wrote:Is there a way to make image load faster ( for 1MB internet speed user ) ?
The internet is like a big truck you just dump things on. And if those tubes get clogged, you need a bigger flatbed
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: A blob image

Post by jaoudestudios »

I would go with thumbnails. Dont store the images in the database, there is no need. When the image is uploaded you are obviously going to have a system that resizes the image as users might upload 6000x4000px and you dont want to try and display that. CSS resizing is not an option for many reasons, but thats another story.

So when you do the resize, create a thumb nail too. When the user wants to see the larger version of the image, they will appreciate it will take a bit longer to download.
Post Reply