Page 1 of 1

A blob image

Posted: Fri Jan 23, 2009 12:01 am
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 ) ?

Re: A blob image

Posted: Fri Jan 23, 2009 12:18 am
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

Re: A blob image

Posted: Fri Jan 23, 2009 9:57 am
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.

Re: A blob image

Posted: Mon Feb 02, 2009 1:20 pm
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

Re: A blob image

Posted: Mon Feb 02, 2009 1:31 pm
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.