Saving a generated image in a database

admin

Administrator
Staff member
Hello!

I have the following problem. I have users upload images to my script. This will put the image in a MySQL database, but it also generates a thumpnail version of the image (using GD's ImageCopyResized($thumpnail, $full, etc.) ), which I also would like to store in my database. How do I do this? Just placing the variable($thumpnail) in the database does not work. So far my only solution is to save the data I as a file (ImageJpeg($thumpnail, file.jpg, 50) ) and then place that file in my database, but I think there must be a better way...

Anyone?
Thanks very much in advance!
 
Back
Top