1 Reply Latest reply on Jun 21, 2008 12:51 AM by Stressed_Simon

    Image Gallery Question

      Maybe not a CF question specifically but I'm hoping someone has some input anyway.

      I was thinking of adding an image gallery for paying users of my site. I have several thousand users and was thinking of giving them all the ability to add 100 or more images each. I would resize images that exceed a set maximum width, high and/or file size to try and keep the bloat down. I'd also want to store one or two different thumbnail sizes for quick load times. My question is what is the best way to store these images? Would I want to do it in a database? It seems like trying to just store the images in a file structure would get out of hand. If I'm going to do this I'll have to plan for the possibility of hosting a million or more images. I've never worked with images on a scale this big before so any help/advise would be appreciated. Anyone know of any write-ups on this subject?

        • 1. Re: Image Gallery Question
          Stressed_Simon Level 1
          This is going to take up space no matter how you go about it. I would advise against storing these as BLOBS in your database. It means that you are going to have to get your DB involved every time you want to serve an image, which means you are going to have to get ColdFusion involved as well, which then reduces your caching options.

          Can you not use a file structure with a folder for each user and a naming convention for the sized images, then just store the filename in a varchar in your database?