When inserting images into my DB i use base64_encode and base64_decode when pulling it back out. And as I see you have an imageview, you should make it so you can base64_decode to view.
BTW, is base64_encode very needed for images in mysql? I learned my image stuff from spoono and they use it, never really looked elsewhere.
You can directly store images in MySQL. You have to use either blob, mediumblob or longblob datatype to store images. SQLyog provides you with a GUI to work with images.
would using longblob be equivilent to using longtext and base64 ? or whats the difference or whats better. And with images out of a database, is there a way to make the browser cache it. my site is http://deadlydesigns.net and all the avatars for each tutorial are stored in the DB and I am not sure if it is being cached.
the difference of the “text” types and the “BLOB” types are that “text” only accepts character-input, BLOB accepts all (Binary) inputs.
As I read from here: http://www.fourmilab.ch/webtools/base64/ base 64 was created to allow transmision of binary data by email. I can't see any idea in transforming binary data to charcater data in order to store it in a database.