Ok, let me ask you this. Would it be better to store images in directories or as a binary in MySQL in their record or in another table tied to them by their record ID?

I would think a whole bunch of image binaries in a database would make it slow eventually. We just launched the site and already have over 1000 members, and foresee over 100k by the end of the year, and it will continue to double in size every 3 to 6 months thereafter for the next few years.

So I am thinking just putting them in a directory called members in the images directory, with the htaccess forbidding a listing of all the pics, would be best.

I could then name the image their username which is unique .whatever, and store the name of the file in their record and just pull it from the directory.

I don't know what do you think would be the better way to do it?

I don't have to use their images, but these are replicated websites with their name and phone number, I thought if their is an image, I could make a field where if they have it set to 1 it would show it if it exists, if not then it would not show it if it existed or if it did not exist it would not show anything. I thought that would be a very nice touch.

Anyhow thank you for any wisdom you can impart, monks.

Junior

In reply to Re: image upload size detection by Anonymous Monk
in thread image upload size detection by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.