Skip to content
Irene Vagionakis edited this page Jan 11, 2021 · 10 revisions

The images we usually want to include in our project can be two types — content images and site images.

Site images are part of the site design (such as logos etc.) and are stored in webapps/ROOT/assets/images/, and the pipelines used are in kiln/sitemaps/assets.xmap. In a template, for example::

<img src="{$kiln:assets-path}/images/logo.jpg" alt="My Favourite Sponsor" />

Kiln can support any image file type, since no processing is done to the files. The pipelines simply transmit the files with an appropriate MIME type. Pipelines exist for GIF, JPEG, and PNG images; others are easily added, to sitemaps/main.xmap and/or kiln/sitemaps/assets.xmap.

Content images (such as photos of the inscriptions) are stored in webapps/ROOT/content/images/. They need to be referenced in the EpiDoc xml files in a url attribute in <graphic> within a <facsimile>. Here's an example:

 <facsimile>
   <surface>
      <graphic url="5.1.jpg">
         <desc xml:lang="en">Facsimile drawing (from Murzakevich 1950)</desc>
         <desc xml:lang="ru">Факсимильное изображение (из Мурзакевич 1950)</desc>
      </graphic>
   </surface>
 </facsimile>

Note that the file extension jpg should be explicitly provided, otherwise an error will occur.

The EpiDoc XSLT transforms the xml markup into html. It contains an image element referencing the thumbnail resource which is a link to the full image. The thumbnail image is automatically generated from a pipeline in main.xmap that only works with jpegs. If you want to use another image format you need to change process that generates the thumbnails in main.xmap yourself.

If you are not storing your content images in webapps/ROOT/content/images/ (because, for example, you are storing them on another server), in webapps/ROOT/sitemaps/config.xmap at ca. line 77 you should change the content of <epidoc-image-loc> (which by default is /images/) accordingly.