<Media>

The <Media> option is used to add or update any number of media images either here individually, or if you have a large number of images, using the <MediaFile> option. The <Id> option can be used as the <MediaId> in <BlogPosts> or added to the <FeaturedImages> when setting up a <Blog>. The media image can also be displayed in the content of blog posts using Embedded References. Most fields are optional. Only the record id and one of the file paths need to be defined. Any missing file paths will be automatically replaced with the next largest size.

Many genealogy applications allow users to add local file paths for their images so that they can be displayed in those applications, however, local file paths need to be prepended with the file protocol scheme ( file:// ) before they can be viewed offline in a browser. The <Placeholders> option can be used to perform a global replace on image file paths. Providing a <Large> image file path here can also be used to override the GEDCOM record's path. To view images online in a browser, a URL must be used. File paths and URLs can only be linked when the they are recognizable as images. This means that the image name must end in a supported extension ( .jpg, .png, .gif, .bmp ). Cloud services that provide image links that do not end in one of these extensions will be treated as standard URLs.

Example

<Media>
  <ForceThumbnails> false                          </ForceThumbnails>           

  <MediaFile>       config\photos - all.tsv        </MediaFile>           

  <Image>
    <Id>       M1                                  </Id>      
    <Title>    Typewriter                          </Title>   
    <Large>    https://c3.staticflickr.com/8/7416/28066454506_70cca2d522_b.jpg  </Large>   
    <Medium>                                                                    </Medium>  
    <Thumb>    https://c3.staticflickr.com/8/7416/28066454506_70cca2d522_q.jpg  </Thumb>   
    <Credit>   <![CDATA[ Photo courtesy of  <a href="https://www.flickr.com/photos/freestocks/" target="blank">freestocks.org</a> ]]>  </Credit>  
    <Caption>  An old typewriter                   </Caption> 
    <Place>                                        </Place>   
    <Date>                                         </Date>    
    <Note>                                         </Note>    
    <Refs>     I1; Bob Builder; S1; S2#23          </Refs>    
    <Private>                                      </Private>  
  </Image>
</Media>

Options

<ForceThumbnails>
[ true ]
When this option is enabled, photos and images that do not specify a thumbnail path will use the photo or image as the thumbnail. Doing this for a large number of images can slow page loading. Disabling this option will display a default placeholder image as the thumbnail instead.
<MediaFile>
[ ]
The absolute or relative folder path where the media file is stored. The media file is a tab-delimited configuration file exported from a spreadsheet (see below). This option is required by the Photo Gallery.
<Image>
This tag indicates the start of a new media image.
<Id>
[ ]
A unique record id.
<Title>
[ ]
An image title
<Large>
[ ]
An absolute or relative file path, or a URL to a hi-res image.
<Medium>
[ ]
An absolute or relative file path, or a URL to a lo-res image.
<Small>
[ ]
An absolute or relative file path, or a URL to a small image.
<Thumb>
[ ]
An absolute or relative file path, or a URL to a thumbnail.
<Credit>
[ ]
A credit line. When used as a blog posts media image, the credit line will be displayed on the blogs index pages.
<Caption>
[ ]
A caption
<Place>
[ ]
A location
<Date>
[ ]
A date
<Note>
[ ]
A note
<Refs>
[ ]
A semi-colon-delimited list on individual names or record ids to which this image should be attached as a profile image. Doing so will add the image to the Photo page and the individual's profile page.
Photos
Photos
Profile - Photos
Profile - Photos
Photos - Photo
Photos - Photo
You may also reference source record ids to attach the image to the source. If a page number is included using a hash (#) i.e. S1#pg1, the image will be added to the referenced source's page. If a blog post's record id is referenced, the image will be used as the posts' featured image (banner).
<Private>
[ false ]
When enabled, the image will be excluded from the family tree when the <Privatize> option is enabled.

Media File

Gigatrees supports adding media items by creating a formatted spreadsheet. The spreadsheet will need to be exported to a tab-delimited text file. A sample spreadsheet and tab-delimited export are provided in the config folder ( config\photos.xlsx, config\photos - all.tsv ). The spreadsheet has the following 20 columns:

<Priv>
When not empty, the photo will be excluded when the <Privatize> option is enabled.
<@>
An optional Record Id Prefix.
<Id>
An optional Record Id. The value (including its prefix) must be unique and can be used for embedding photos using embedded reference as well as for use in the default album and collection thumbnails (see below).
<Filename>
The photo filename to be used for sorting photos in collection groups.
<Prefix>
An optional prefix to prepend to the photo path.
<Path>
A URL or the absolute or relative folder path of the photo with or without its extension. This field cannot be left blank.
<Large>
An optional suffix to append to the path for large photos.
<Medium>
An optional suffix to append to the path for medium photos.
<Small>
An optional suffix to append to the path for small photos.
<Thumb>
An optional suffix to append to the path for thumbnails.
<Group>
The collection group name to which the photo will be assigned. If the group is missing, the photo will not be added to the gallery. This can be useful for adding source images and overrides those added using the media option.
<Date>
The photo's date
<Refs>
A semi-colon delimited list of individual record ids to whom this photo will be atttached. To attach a photo to a source record, reference the source record id (and leave the Group field empty).
<Title>
An optional Photo title
<Tags>
A comma-delimited list of collection tags.
<Caption>
An optional photo caption
<Location>
An optional photo location.
<Submitter>
An optional submitter name or copyright statement.
<Modified>
An optional modified date. This is used for determining if a photo is recent.
<Notes>
An optional note.

Exported spreadsheet: tab-delimited text file:

Priv  @  Id  Filename Prefix              Path                        Large        Medium        Small         Thumb         Group        Date  Refs  Title  Tags           Caption          Location  Submitter    Modified    Notes
         G1  1860-001 https://imgur.com/  jT2aT6i                     .jpg         h.jpg         m.jpg         b.jpg         1800        1860s  I13          tag-00,tag-aa  Lucinda Armitage                
      G   2  1868-001                     https://imgur.com/          DVxzKJE.jpg  DVxzKJEh.jpg  DVxzKJEm.jpg  DVxzKJEb.jpg  1800        c1868  I14          tag-00,tag-ee  Charles Armitage                        11.21.2009  
      G   3  1900-001                     https://imgur.com/t9RrMbF   .jpg         h.jpg         m.jpg         b.jpg         1900      03.1900  person6      tag-cc,tag-jj  Teresa Dent      Illinois  Bob Builder  
...
      G   Q  2012-001                     https://google.com/rrjYMo...                                                       2012   01.01.2012               tag-yy         Elmo                                    11.17.2020  
...
             image1.png                   https://imgur.com/POLruFa   .png         h.png         m.png         b.png                            SR2

As is evident from the example, there are several ways to configure the photo path depending if the photo is local or located in the cloud, and if in the cloud, whether the cloud URL includes a photo extension. This method can also be used to easily add images to source records by referencing a source Record Id instead of an individual Record Id. When adding source images, be sure the leave the Group field blank so they will be added to the Photo Gallery as well.

Comments