Menu

Media - File Size Limits

Help
branb
2010-04-19
2013-05-30
  • branb

    branb - 2010-04-19

    Hello,

    I am the administrator for a PGV installation.  And, I wanted to ask two questions regarding file size limits:

    1) Is there a way to automatically limit the file size of images users can upload?

    Most of my users are not hip to the need to reduce image file sizes (i.e. think newbie who just got a new digital camera). I'm concerned that if my users are not required to make their images smaller they will naively upload huge files that will take up too much space and slow down the system.

    2) If I can limit the file size of images users can upload, what is a good file size limit to set?

    I'm thinking that probably that for image file sizes that a decent image shouldn't be larger that 200K (72 DPI).

    Any advice would be greatly appreciated.

    Thanks,

    -BRANB

     
  • Gerry Kroll

    Gerry Kroll - 2010-04-19

    There is no way to limit image file sizes within PhpGedView.  You can limit file transfer size within PHP by setting a configuration option in php.ini accordingly, but this isn't a good idea.

    I think you would be wise to NOT allow your users to upload pictures directly into PhpGedView.  For one thing, you'd have all sorts of problems with file names and with improper or incorrect linking of these uploaded pictures to individuals, families, or sources.  Titles of these pictures, and associated descriptions (who all is in the picture, for instance) wouldn't be consistent.  You'd end up with a REAL mess that would take much work to clear up later.  You also need to set up some sort of tracking system to tell you where the picture came from.  (Believe me:  you'll eventually NEED this!)

    You could consider setting up an FTP account so that your users could deposit their pictures in a directory outside PGV.  You'd then be able to adjust image sizes (I suggest a limit of 600 px high or wide) and also correct file names before uploading to PGV (under your control).

    Alternatively, it might actually be simpler for your users to just send you an e-mail with a picture attachment.  You can then exchange e-mails with the submitter when the original submission doesn't have enough information.

     
  • branb

    branb - 2010-04-19

    Thanks for the advice! This is the information I needed.

    Follow-up questions:

    1) What is a good naming convention for image files?

    I have been taking the original image filename, "Photo01234.jpeg", and adding a Surname/given name prefix, like "Smith-John Jasper Photo01234.jpeg".

    2) I've had trouble with thumbnails not being generated automatically. Should I be doing something to the photo before I upload it? Can I provide a thumbnail after I upload it?

    Thank you, again for your valuable time,

    -BRANB

     
  • Greg Roach

    Greg Roach - 2010-04-19

    You can limit file sizes by adding the following hidden element to your forms:

    <input type="hidden" name ="MAX_FILE_SIZE" value="500000">

    PHP will detect files larger than this, and give you an appropriate error.

     
  • Gerry Kroll

    Gerry Kroll - 2010-04-19

    I'll address your questions in reverse order:

    Thumbnails are created automatically when (a) you have enough memory and (b) you have configured PGV for auto thumbnail creation and (C) you have proper universal read/write/modify permissions on the "/media" directory and ALL its contents and subdirectories and (d) you don't provide a thumbnail to upload at the same time you upload the main image and (e) the provided thumbnail and main image have the same file name.

    "Enough memory" is highly dependent on the size of the image and the colour depth.  The entire image has to be converted to a bit map and then the bit map has to be copied before it can be resized.  A 700 Kb JPG file can easily become a 20 Mb bit map!

    Naming convention is entirely up to you.  Here's how my site is organized.  Of course, your might have a better idea.  I'm using the media firewall, so the actual directory where media files are stored is outside the web-addressable file space on the server.  My comments apply equally whether the main media directory is protected by the media firewall or is the default "/media" directory within the PhpGedView install directory on the server.

    On my site, each surname has its own subdirectory under the main "/media" directory.  This avoids a cumbersome file structure where everything is in the "/media" directory.  In the case of families, the surname used is the male partners.  In the case of same-sex families, one partner is designated as the "husband", and that surname applies.  Married names for females are not used - on my site all females are recorded ONLY by their maiden name.

    File names reflect the ID number of the individual or family depicted.  Because you are likely to have more than one picture for the same individual, there's a numeric suffix that means nothing other than keeping the file names distinct.

    Example:
    My surname is "Kroll", and that of my wife is "FitzGerald".  I'm I0001, she's I0008.  Our kids, surname "Kroll" are I0009 and I0010.  The family is F0001.

    Pictures of me, the kids, and the family will be found in the "kroll" subdirectory.  Pictures of my wife, her brother and his family, and her father and his family are in the "fitzgerald" subdirectory.  Her mother's picture is in the "jones" subdirectory.

    Pictures of me would be named I0001-01.jpg , I0001-02.jpg , I0001-03.jpg , etc.  Pictures of my kids would be named I0009-01.jpg , I0009-02.jpg , I0009-03.jpg , etc.  Pictures of the whole family or of me and my wife together would be named F0001-01.jpg , F0001-02.jpg , F0001-03.jpg , etc.  Pictures of my wife would be named I0008-01.jpg , I0008-02.jpg , I0008-03.jpg , etc.

    When a picture shows more than one person, you should link that picture to all of them.  For example, all those F0001.-xx.jpg pictures would be linked to I0001, I0008, I0009, I0010, and F0001.  When there's more than one person in the picture, you should use a Note attached to the image to identify each person.  Don't use the image's title for this purpose.

    You should always use the "Highlight" option when you're editing the details of each picture.  When the Highlight option is set to "yes", that picture will be selected as the one to show on the Personal Details or the Family pages or on charts.  Only one picture linked to each person should have the "Highlight" option set to "yes".  The others should all have this option set to blank.

    If you wish, I can give you temporary access to my site so that you can see how it's organized and how all that stuff works.

     
  • knorway

    knorway - 2010-04-19

    I use a similar naming convention for photos of individuals.   The ID number will never change so it is safe to use it.  As far as structure I have two sub-folders under the surname 1) photos 2) documents.   This is so I can separate documents (they are still jpg files) that I collect for sourcing support from those that are of family members.   In cases like a census document I will use a FamilyID as opposed to the IndividualID in a photo.  I like the above use (and reuse) of family group photos with an "F" prefix. 

     
  • Stuart.G

    Stuart.G - 2010-04-20

    Perhaps just to confuse the issue of naming conventions, I pass on, for what it is worth, how I do mine.  To begin with, I do not have a different naming convention for images used in PGV, to images for general viewing such as holidays etc. If the photos are of people, then the surname of the main person is used. For example, if it is a family gathering to celebrate a wedding anniversary, then it is the surname (family name) of  that person followed by first name then usually a suffix (001 or a,b,c, etc). If the photos are of places such as cemeteries for example, I use the place name and a suffix if required.

    Now specifically relating these images to PGV. I always reduce the file size to about 800 px wide or high. Within my media directory I have many sub directories and sub-directories within them. The first level directories include such folders as BirthCertificates, MarriageCertificates, DeathCertificates, Cemeteries, Graves, ShippingEmigration, HousesHomes etc etc. I also have a directory labelled - People. Within this directory I have sub-directories of the surname of the most common family names. I do not use any PGV related ID for naming files - either INDI of FAM.

    Having a standard naming convention for files wherever they are stored or used suits me. It might not suit others. I use the photos in many applications including off-line family history programmes. Using the same file name wherever they are used makes it easy to find the original image when that is required. I also use the EXIF and metadata fields for adding further information.

    Stuart

     
  • macalter

    macalter - 2010-04-20

    To add to the naming conventions given, I also keep a directory labelled PLACES. Using the same hierarchy I use in PGV, I keep all documents/photos there relating to places. My two others are INDIVIDUAL and FAMILY and follow canajun2eh except I label the folder with the offline app reference number as I may have images before I have the PGV number. Then before uploading, I'll label the image itself with the INDI number_lastnameFirstInitials. <i212_BrownJ.jpg> (I use lowercase for i to make difference betweeen number 1 :)

     
  • Nolens Volens

    Nolens Volens - 2010-04-25

    I use my site not only for genealogy but also for a kind of familysearch.
    First I decided to group the images into several branches - pictures( people ), places, thumbstones, documents and so on
    Next level is the filename - i use a kind of descriptive as i often have groups of indis on one image. If you are looking for an photo it is easy to check by name when you are FTPing. Something like GV_Schreck_GM_MarieSambewa_ca_1920_in_Berlin.jpg or Todesanzeige_Louis_Schreck_1930-02-22.jpg

    Fotos of Places, Locations etc are named like place_hierarchie: DEU_BAYERN_MUENCHEN_Christuskirche_1920.jpg

    I found out, that i could use the photos for different purposes and know imidiately what kind of photo it is, when and where  it was taken and what or who is shown.

    So you can reorganize your gedcom ids and dont have to touch the files to get them in sync!
    Christian

     

Log in to post a comment.