Encoding Images in Notes - LiteratureInContext/LiC-data GitHub Wiki

Your annotations may include images that provide a visual representation of some part of the annotation. These images should come from reliable sources and they must be appropriate (see documentation).

Downloading and storing:

Download the legal image to a folder on your computer or a shared folder on something like OneDrive or Google Drive named according to our AWS storage conventions. These images will later be uploaded to our AWS server, so you can give that folder a title that matches the storage naming conventions.

  1. If your XML document is identified in its xml:id as “franklin-autobiography,” then that means there will be an AWS folder called “franklin-autobiography.”
  2. Inside “franklin-autobiography” will be two folders, one called “pageImages,” and one called “notes.”

Information you’ll need to add:

Each image included in an annotation needs special information associated with it for accessibility and representation purposes. You will need to add:

  1. Alternative text: A textual description of the image. Here is some guidance on writing effective alt text.
  2. Source: This will be the resolveable URL to the website where your image was found. Remember, this source should be reliable and appropriate!
  3. Description/Caption: A textual caption including information like author/creator, title, date, and original source (like the museum or the library from @source, above—say, the Victoria and Albert Museum, or Wikimedia Commons).

Crafting your XML:

Any image in an annotation will be encased in the <graphic> element tag, and it will include attributes @alt, @source, and @desc, as follows: <graphic url=”notes/FILENAME.JPG” alt=”Add your alt text description here” source=”complete simple url with no generated data to the best source page for your image” desc=”Textual caption”/>

Note that the source caption will be clickable, if you’ve added @source as required. Remember that you need to have a resolvable URL, not one linking dynamically or through a proxy, because it will break when someone else tries to click it. Either that, or it will throw an error because the XML doesn’t recognize special characters in URLs. We are working on ensuring the caption appears just beneath the image; do not worry if yours doesn’t display as it should.

⚠️ **GitHub.com Fallback** ⚠️