Forum Moderators: coopster

Message Too Old, No Replies

Storing images in Mysql Versus generating them.

a few questions.

         

PokeTech

4:26 pm on Jun 25, 2009 (gmt 0)

10+ Year Member



Well my site allows users to generate images using PHP's GD library and then place the url/image on other sites for other people to see. These images change every now and then when a user levels them up or what not. I'm just wondering would generating the image code and then placing that in mysql and then echoing that; would that save more ram than having to generate it every time someone views the image?

I'm not really worried about slowness unless it's incredibly slow I just want to save more ram.

jatar_k

8:30 pm on Jun 25, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



do you mean save the whole image to mysql?

why not just gen them, make them static images, and then serve those. You could update them on some schedule as well as whenever the user changes them.

NeilsPHP

7:42 pm on Jun 30, 2009 (gmt 0)

10+ Year Member



you could try saving them as blob data type in mysql.(it will take more space of your db though)