<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Galleria - Config</title><link href="http://galleria.artliba.org/" rel="alternate"></link><link href="http://galleria.artliba.org/feeds/config.atom.xml" rel="self"></link><id>http://galleria.artliba.org/</id><updated>2023-01-14T00:00:00+01:00</updated><subtitle>A responsive pelican gallery plugin</subtitle><entry><title>The file pelicanconf.py</title><link href="http://galleria.artliba.org/1c-pelicanconf.html" rel="alternate"></link><published>2023-01-14T00:00:00+01:00</published><updated>2023-01-14T00:00:00+01:00</updated><author><name>Pirogh Hesse</name></author><id>tag:galleria.artliba.org,2023-01-14:/1c-pelicanconf.html</id><summary type="html">&lt;p&gt;Here is a complete example of the &lt;tt class="docutils literal"&gt;pelicanconf.py&lt;/tt&gt; file,
as used for the present documentation of the theme.
It starts by setting some standard &lt;a class="reference external" href="https://getpelican.com"&gt;pelican&lt;/a&gt; variables, as usual.
Then, come the theme's and the optional plugins.&lt;/p&gt;
&lt;pre class="literal-block"&gt;
# =============================
# 1. standard pelican variables
# =============================
SITEURL      = 'http://galleria.artliba.org'
SITENAME     = 'Galleria'
AUTHOR       = 'Pirogh Hesse'
SITESUBTITLE = 'A responsive pelican gallery plugin'
TIMEZONE     = 'Europe/Paris'
DEFAULT_LANG = 'en'
LOCALE       = 'C'

PATH         = 'content'
STATIC_PATHS = ['images', 'theme']

OUTPUT_PATH  = 'output'

DISPLAY_CATEGORIES_ON_MENU = False # choose a custom top menu here
MENUITEMS = (
  ('About',      'about.html'),
  ('All',        'index.html'),
  ('Overview',   '1a-getting-started.html'),
  ('Directive',  '1b-directive.html'),
  ('Config',     '1c-pelicanconf.html'),
  ('#Tags',      'tags.html'),
)
DEFAULT_PAGINATION =   6 …&lt;/pre&gt;</summary><content type="html">&lt;p&gt;Here is a complete example of the &lt;tt class="docutils literal"&gt;pelicanconf.py&lt;/tt&gt; file,
as used for the present documentation of the theme.
It starts by setting some standard &lt;a class="reference external" href="https://getpelican.com"&gt;pelican&lt;/a&gt; variables, as usual.
Then, come the theme's and the optional plugins.&lt;/p&gt;
&lt;pre class="literal-block"&gt;
# =============================
# 1. standard pelican variables
# =============================
SITEURL      = 'http://galleria.artliba.org'
SITENAME     = 'Galleria'
AUTHOR       = 'Pirogh Hesse'
SITESUBTITLE = 'A responsive pelican gallery plugin'
TIMEZONE     = 'Europe/Paris'
DEFAULT_LANG = 'en'
LOCALE       = 'C'

PATH         = 'content'
STATIC_PATHS = ['images', 'theme']

OUTPUT_PATH  = 'output'

DISPLAY_CATEGORIES_ON_MENU = False # choose a custom top menu here
MENUITEMS = (
  ('About',      'about.html'),
  ('All',        'index.html'),
  ('Overview',   '1a-getting-started.html'),
  ('Directive',  '1b-directive.html'),
  ('Config',     '1c-pelicanconf.html'),
  ('#Tags',      'tags.html'),
)
DEFAULT_PAGINATION =   6; # article summaries per page
SUMMARY_MAX_LENGTH = 100; # counted in words

RELATIVE_URLS                    = True
SLUGIFY_SOURCE                   = 'basename' 
ARTICLE_URL   = ARTICLE_SAVE_AS  = '{slug}.html'
CATEGORY_URL  = CATEGORY_SAVE_AS = '{slug}.html'
TAG_URL       = TAG_SAVE_AS      = '{slug}.html'
AUTHOR_URL    = AUTHOR_SAVE_AS   = '{slug}.html'
ARCHIVES_SAVE_AS                 = 'archives.html'
YEAR_ARCHIVE_SAVE_AS             = 'archive_{date:%Y}.html'
MONTH_ARCHIVE_SAVE_AS            = 'archive_{date:%Y}_{date:%m}.html'
# =============================
# 2. Lepagito theme
# =============================
THEME = '/home/hesse/dvt-perso/lepagito'
#TAGS_BY_GROUPS = (
#  ('Pelican',       ('tag-group', 'navigation', 'plugin', 'pelicanconf.py')),
#)
FOOTERMENUITEMS = (
  ('About',    'about.html'),
  ('License',  'about.html#license-1'),
)
LEPAGITO_NAVIGATION_SWAP = True
# =============================
# 3. plugins
# =============================
PLUGIN_PATHS  = ['/home/hesse/dvt-perso/theme-config/pelican/plugins',
                 '/home/hesse/dvt-perso/galleria/pelican/plugins',
                 '/home/hesse/pelican-plugins/search/pelican/plugins']
PLUGINS = ['theme_config', 'neighbors', 'galleria', 'search']
LEPAGITO_HAVE_SEARCH_MENU = ('search' in PLUGINS) # activate search menu

# =============================
# 4. configuration
# =============================
GALLERIA_LIBRARY_PATH          = ['/home/hesse/dvt-perso/galleria/doc/content']
LEPAGITO_GALLERY_CSS_FILE      = 'galleria.css'
GALLERIA_PROCESS = {
    'image-icon': {
        'type': 'image',
        'ops': ['50x50', '+profile &amp;quot;*&amp;quot;'],
    },
    'image-medium': {
        'type': 'image',
        'ops': ['300x300', '+profile &amp;quot;*&amp;quot;'],
    },
    'crisp': {
        'type': 'responsive-image',
        'srcset': [
            ('1x', [ '300x225', '+profile &amp;quot;*&amp;quot;']),
            ('2x', [ '600x450', '+profile &amp;quot;*&amp;quot;']),
            ('3x', ['1200x900', '+profile &amp;quot;*&amp;quot;']),
        ],
        'default': '1x',
    },
    'responsive-medium': {
        'type': 'responsive-image',
        'sizes': (
            '(min-width: 768px) 650px, '
            '(min-width: 1200px) 800px, '
            '100vw'
        ),
        'srcset': [
            ('600w', ['600x450', '+profile &amp;quot;*&amp;quot;']),
            ('800w', ['800x600', '+profile &amp;quot;*&amp;quot;']),
        ],
        'default': '800w',
    },
    # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture
   'picture-tag': {
       'type': 'picture',
       'sources': [
           {
               'name': 'default',
               'media': '(min-width: 640px)',
               'srcset': [
                   ( '640w', [ '640x480',  '+profile &amp;quot;*&amp;quot;']),
                   ('1024w', ['1024x683',  '+profile &amp;quot;*&amp;quot;']),
                   ('1600w', ['1600x1200', '+profile &amp;quot;*&amp;quot;']),
               ],
               'sizes': '100vw',
           },
           {
               'name': 'source-1',
               'srcset': [
                   ('1x', ['200x200']),
                   ('2x', ['300x300']),
               ]
           },
       ],
       'default': ('default', '640w'),
   },
}
GALLERIA_DEFAULT_CLASS      = 'picture-tag' # should be defined
GALLERIA_DEFAULT_MAX_HEIGHT = '600px'
GALLERIA_ICON_CLASS         = 'image-icon'  # idem
GALLERIA_PROCESS_DIR        = &amp;quot;process&amp;quot;
GALLERIA_RESIZE_JOBS        = 10


&lt;/pre&gt;
&lt;p&gt;Remark in the first
that all URLs are chosen as relative here:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
RELATIVE_URLS = True
ARTICLE_URL   = ARTICLE_SAVE_AS  = '{slug}.html'
CATEGORY_URL  = CATEGORY_SAVE_AS = '{slug}.html'
&lt;/pre&gt;
&lt;p&gt;Also, all output files (articles, categories, tags, ...)
are written in the same &amp;quot;output/&amp;quot; directory, without any hierarchy.
This setting is convenient, since it allows
to develop and fully test the blog off-line
before to upload it on its final destination:
relative URLs, such as in the &lt;tt class="docutils literal"&gt;MENUITEMS&lt;/tt&gt;,
work both in off-line and in-line modes.&lt;/p&gt;
&lt;p&gt;The second part of the configuration file
contains the specific settings of the &lt;a class="reference external" href="https://lepagito.artliba.org"&gt;lepagito&lt;/a&gt; theme:
see the &lt;a class="reference external" href="https://lepagito.artliba.org"&gt;lepagito&lt;/a&gt; documentation for more.&lt;/p&gt;
&lt;p&gt;Finally, the third part
of the &lt;tt class="docutils literal"&gt;pelicanconf.py&lt;/tt&gt; file
sets the &lt;a class="reference external" href="https://galleria.artliba.org"&gt;galleria&lt;/a&gt; plugin.
The &lt;tt class="docutils literal"&gt;GALLERIA_LIBRARY_PATH&lt;/tt&gt; furnishes a list of directories for searching
image files recursively.
The &lt;tt class="docutils literal"&gt;THEME_TEMPLATES_OVERRIDES&lt;/tt&gt; pelican variable indicates where to find
the template files such as &lt;tt class="docutils literal"&gt;galleria.html&lt;/tt&gt;.
The &lt;tt class="docutils literal"&gt;LEPAGITO_GALLERY_CSS_FILE&lt;/tt&gt; furnishes the name of the
&lt;a class="reference external" href="https://galleria.artliba.org"&gt;galleria&lt;/a&gt; css file: the &lt;a class="reference external" href="https://lepagito.artliba.org"&gt;lepagito&lt;/a&gt; theme will include it.
Note that its default value is &lt;tt class="docutils literal"&gt;galleria.css&lt;/tt&gt;, so this line is optional.&lt;/p&gt;
&lt;p&gt;Now comes the most step in configuring this plugin:
we have to define the image transformations in the &lt;tt class="docutils literal"&gt;pelicanconf.py&lt;/tt&gt; file.
Transformations are defined in the &lt;tt class="docutils literal"&gt;GALLERIA_PROCESS&lt;/tt&gt; dictionary,
mapping a transformation name to a list of operations.
There are three types of transformations:
&lt;tt class="docutils literal"&gt;image&lt;/tt&gt; replacement, &lt;tt class="docutils literal"&gt;responsive&lt;/tt&gt; image, and &lt;tt class="docutils literal"&gt;picture&lt;/tt&gt; set.&lt;/p&gt;
&lt;div class="section" id="image-replacement"&gt;
&lt;h2&gt;Image replacement&lt;/h2&gt;
&lt;p&gt;The simplest image processing will replace the original image by a new,
transformed image computed from the original.
You may use this, for example, to ensure that all images are of the same size,
or to compute an icon or a medium image for an article:&lt;/p&gt;
&lt;pre class="code rst literal-block"&gt;
GALLERIA_PROCESS = {&lt;span class="w"&gt;
&lt;/span&gt;  'image-icon': {&lt;span class="w"&gt;
&lt;/span&gt;      'type': 'image',&lt;span class="w"&gt;
&lt;/span&gt;      'ops': ['50x50', '+profile &amp;quot;*&amp;quot;'],&lt;span class="w"&gt;
&lt;/span&gt;  },&lt;span class="w"&gt;
&lt;/span&gt;  'image-medium': {&lt;span class="w"&gt;
&lt;/span&gt;      'type': 'image',&lt;span class="w"&gt;
&lt;/span&gt;      'ops': ['300x300', '+profile &amp;quot;*&amp;quot;'],&lt;span class="w"&gt;
&lt;/span&gt;  },&lt;span class="w"&gt;
&lt;/span&gt;}
&lt;/pre&gt;
&lt;p&gt;Here, we define two &lt;tt class="docutils literal"&gt;classes&lt;/tt&gt; of transformation, with the labels:
&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;image-icon&lt;/span&gt;&lt;/tt&gt; for thumbnails and &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;image-medium&lt;/span&gt;&lt;/tt&gt; for articles.
Both have the type &lt;tt class="docutils literal"&gt;image&lt;/tt&gt;, which is a keyword that means image transformation.
Then comes the &lt;tt class="docutils literal"&gt;ops&lt;/tt&gt; field, which is a list of two elements.
The first one is the transformed image size.
The transformed image will be obtained from original one by using the
&lt;a class="reference external" href="http://www.graphicsmagick.org/convert.html"&gt;gm convert&lt;/a&gt; command.
The second element of the list is a string containing any options
to transmit to
the &lt;a class="reference external" href="http://www.graphicsmagick.org/convert.html"&gt;gm convert&lt;/a&gt; command.
So, any transformation, such as rotating, cropping, ... could be
also specified here.
The generic &lt;a class="reference external" href="http://www.graphicsmagick.org/convert.html"&gt;gm convert&lt;/a&gt; command used here writes:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
gm&lt;span class="w"&gt; &lt;/span&gt;convert&lt;span class="w"&gt; &lt;/span&gt;-size&lt;span class="w"&gt; &lt;/span&gt;&amp;lt;wxh&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;&amp;lt;orig-img&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;-resize&lt;span class="w"&gt; &lt;/span&gt;&amp;lt;wxh&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;&amp;lt;options&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;&amp;lt;trsf-img&amp;gt;
&lt;/pre&gt;
&lt;p&gt;In the previous &lt;tt class="docutils literal"&gt;GALLERIA_PROCESS&lt;/tt&gt; example,
we use the string &lt;tt class="docutils literal"&gt;+profile &amp;quot;*&amp;quot;&lt;/tt&gt;:
this &lt;a class="reference external" href="http://www.graphicsmagick.org/convert.html"&gt;gm convert&lt;/a&gt; option removes any ICM, EXIF, IPTC, or other profiles
that might be present in the original image and aren't needed in the
transformed one.
The chosen transformation could be selected by using the &lt;tt class="docutils literal"&gt;:class:&lt;/tt&gt;
optional field of the &lt;tt class="docutils literal"&gt;galleria&lt;/tt&gt; directive, e.g.:&lt;/p&gt;
&lt;pre class="code rst literal-block"&gt;
&lt;span class="p"&gt;..&lt;/span&gt; &lt;span class="ow"&gt;galleria&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;   tiryns.jpg&lt;span class="w"&gt;
&lt;/span&gt;   boxers.jpg&lt;span class="w"&gt;
&lt;/span&gt;   swallows.jpg&lt;span class="w"&gt;
&lt;/span&gt;   caryatid.jpg&lt;span class="w"&gt;
&lt;/span&gt;   &lt;span class="nc"&gt;:class:&lt;/span&gt; image-medium
&lt;/pre&gt;
&lt;p&gt;It gives:&lt;/p&gt;
  &lt;ul class="galleria"
  &gt;
      &lt;li&gt;
&lt;!-- SITEURL              = . --&gt;
&lt;!-- image_relative_path  = images/tiryns.jpg --&gt;
&lt;!-- image_full_path      = /home/hesse/dvt-perso/galleria/doc/content/images/tiryns.jpg --&gt;
&lt;!-- image_replace        = images/process/image-medium/tiryns.jpg --&gt;
&lt;!-- image_sizes          = None --&gt;
&lt;!-- image_srcset         = None --&gt;
&lt;!-- image_sources        = None --&gt;
&lt;!-- image_caption        =  --&gt;
&lt;!-- image_target         =  --&gt;
&lt;!-- image_class          = image-medium --&gt;
&lt;!-- image_type           = image --&gt;
&lt;!-- max_height           = 600px --&gt;
&lt;!-- options              = {'class': 'image-medium', 'max-height': '600px', 'type': 'image'} --&gt;
&lt;!-- single_image         =  --&gt;
&lt;figure&gt;
    &lt;a href="./images/tiryns.jpg"&gt;
      &lt;img
          src="images/process/image-medium/tiryns.jpg"
          style="max-width: 100%; height: auto; max-height: min(100vh, 600px);"
      &gt;
    &lt;/a&gt;
&lt;/figure&gt;      &lt;/li&gt;
      &lt;li&gt;
&lt;!-- SITEURL              = . --&gt;
&lt;!-- image_relative_path  = images/boxers.jpg --&gt;
&lt;!-- image_full_path      = /home/hesse/dvt-perso/galleria/doc/content/images/boxers.jpg --&gt;
&lt;!-- image_replace        = images/process/image-medium/boxers.jpg --&gt;
&lt;!-- image_sizes          = None --&gt;
&lt;!-- image_srcset         = None --&gt;
&lt;!-- image_sources        = None --&gt;
&lt;!-- image_caption        =  --&gt;
&lt;!-- image_target         =  --&gt;
&lt;!-- image_class          = image-medium --&gt;
&lt;!-- image_type           = image --&gt;
&lt;!-- max_height           = 600px --&gt;
&lt;!-- options              = {'class': 'image-medium', 'max-height': '600px', 'type': 'image'} --&gt;
&lt;!-- single_image         =  --&gt;
&lt;figure&gt;
    &lt;a href="./images/boxers.jpg"&gt;
      &lt;img
          src="images/process/image-medium/boxers.jpg"
          style="max-width: 100%; height: auto; max-height: min(100vh, 600px);"
      &gt;
    &lt;/a&gt;
&lt;/figure&gt;      &lt;/li&gt;
      &lt;li&gt;
&lt;!-- SITEURL              = . --&gt;
&lt;!-- image_relative_path  = images/swallows.jpg --&gt;
&lt;!-- image_full_path      = /home/hesse/dvt-perso/galleria/doc/content/images/swallows.jpg --&gt;
&lt;!-- image_replace        = images/process/image-medium/swallows.jpg --&gt;
&lt;!-- image_sizes          = None --&gt;
&lt;!-- image_srcset         = None --&gt;
&lt;!-- image_sources        = None --&gt;
&lt;!-- image_caption        =  --&gt;
&lt;!-- image_target         =  --&gt;
&lt;!-- image_class          = image-medium --&gt;
&lt;!-- image_type           = image --&gt;
&lt;!-- max_height           = 600px --&gt;
&lt;!-- options              = {'class': 'image-medium', 'max-height': '600px', 'type': 'image'} --&gt;
&lt;!-- single_image         =  --&gt;
&lt;figure&gt;
    &lt;a href="./images/swallows.jpg"&gt;
      &lt;img
          src="images/process/image-medium/swallows.jpg"
          style="max-width: 100%; height: auto; max-height: min(100vh, 600px);"
      &gt;
    &lt;/a&gt;
&lt;/figure&gt;      &lt;/li&gt;
      &lt;li&gt;
&lt;!-- SITEURL              = . --&gt;
&lt;!-- image_relative_path  = images/caryatid.jpg --&gt;
&lt;!-- image_full_path      = /home/hesse/dvt-perso/galleria/doc/content/images/caryatid.jpg --&gt;
&lt;!-- image_replace        = images/process/image-medium/caryatid.jpg --&gt;
&lt;!-- image_sizes          = None --&gt;
&lt;!-- image_srcset         = None --&gt;
&lt;!-- image_sources        = None --&gt;
&lt;!-- image_caption        =  --&gt;
&lt;!-- image_target         =  --&gt;
&lt;!-- image_class          = image-medium --&gt;
&lt;!-- image_type           = image --&gt;
&lt;!-- max_height           = 600px --&gt;
&lt;!-- options              = {'class': 'image-medium', 'max-height': '600px', 'type': 'image'} --&gt;
&lt;!-- single_image         =  --&gt;
&lt;figure&gt;
    &lt;a href="./images/caryatid.jpg"&gt;
      &lt;img
          src="images/process/image-medium/caryatid.jpg"
          style="max-width: 100%; height: auto; max-height: min(100vh, 600px);"
      &gt;
    &lt;/a&gt;
&lt;/figure&gt;      &lt;/li&gt;
  &lt;/ul&gt;
&lt;p&gt;Observe that, when decreasing the window width, the image layout still is dynamically
rearranged, but the image size is now fixed: it is maximized so that
both width and height are bounded to 300 pixels.
Note that the &lt;a class="reference external" href="https://en.wikipedia.org/wiki/ReStructuredText"&gt;reStructuredText&lt;/a&gt; reader will convert underscores &lt;tt class="docutils literal"&gt;(_)&lt;/tt&gt;
to dashes &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;(-)&lt;/span&gt;&lt;/tt&gt; in class names, so to make sure everything runs smoothly,
do not use underscores in your transformation names.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="responsive-image"&gt;
&lt;h2&gt;Responsive image&lt;/h2&gt;
&lt;p&gt;Let us increase the sophistication:
you can use &lt;a class="reference external" href="https://galleria.artliba.org"&gt;galleria&lt;/a&gt; to automatically generate one time for all
a set of images that will be automatically selected for display by browsers according
to the viewport width or according to the device resolution.
To accomplish this, &lt;a class="reference external" href="https://galleria.artliba.org"&gt;galleria&lt;/a&gt; will add to the &lt;tt class="docutils literal"&gt;html &amp;lt;img&amp;gt;&lt;/tt&gt; tag
both a &lt;tt class="docutils literal"&gt;srcset&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;style&lt;/tt&gt; attributes,
and optionally &lt;tt class="docutils literal"&gt;sizes&lt;/tt&gt; attribute.&lt;/p&gt;
&lt;p&gt;&lt;tt class="docutils literal"&gt;html5&lt;/tt&gt; supports two types of responsive image sets.
The first one is device-pixel-ratio-based, selecting higher resolution images
for higher resolution devices.
The second one is viewport-based, selecting images according to the viewport size.
You can read more about &lt;tt class="docutils literal"&gt;html5&lt;/tt&gt; &lt;a class="reference external" href="https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images"&gt;responsive images&lt;/a&gt; for a gentle introduction
to the &lt;tt class="docutils literal"&gt;srcset&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;&amp;lt;picture&amp;gt;&lt;/tt&gt; syntaxes.&lt;/p&gt;
&lt;p&gt;To tell &lt;a class="reference external" href="https://galleria.artliba.org"&gt;galleria&lt;/a&gt; to generate a responsive image,
add a responsive-image transformation to your your
&lt;tt class="docutils literal"&gt;GALLERIA_PROCESS&lt;/tt&gt; dictionary, with the following syntax:&lt;/p&gt;
&lt;pre class="code rst literal-block"&gt;
GALLERIA_PROCESS = {&lt;span class="w"&gt;
&lt;/span&gt;  'crisp': {&lt;span class="w"&gt;
&lt;/span&gt;      'type': 'responsive-image',&lt;span class="w"&gt;
&lt;/span&gt;      'srcset': [&lt;span class="w"&gt;
&lt;/span&gt;          ('1x', ['300x225', '+profile &amp;quot;*&amp;quot;']),&lt;span class="w"&gt;
&lt;/span&gt;          ('2x', ['600x450', '+profile &amp;quot;*&amp;quot;']),&lt;span class="w"&gt;
&lt;/span&gt;          ('2x', ['1200x900', '+profile &amp;quot;*&amp;quot;']),&lt;span class="w"&gt;
&lt;/span&gt;      ],&lt;span class="w"&gt;
&lt;/span&gt;      'default': '1x',&lt;span class="w"&gt;
&lt;/span&gt;  },&lt;span class="w"&gt;
&lt;/span&gt;  'responsive-medium': {&lt;span class="w"&gt;
&lt;/span&gt;      'type': 'responsive-image',&lt;span class="w"&gt;
&lt;/span&gt;      'sizes': (&lt;span class="w"&gt;
&lt;/span&gt;          '(min-width: 768px) 650px, '&lt;span class="w"&gt;
&lt;/span&gt;          '(min-width: 1200px) 800px, '&lt;span class="w"&gt;
&lt;/span&gt;          '100vw'&lt;span class="w"&gt;
&lt;/span&gt;      ),&lt;span class="w"&gt;
&lt;/span&gt;      'srcset': [&lt;span class="w"&gt;
&lt;/span&gt;          ('600w', ['600x450', '+profile &amp;quot;*&amp;quot;']),&lt;span class="w"&gt;
&lt;/span&gt;          ('800w', ['800x600', '+profile &amp;quot;*&amp;quot;']),&lt;span class="w"&gt;
&lt;/span&gt;      ],&lt;span class="w"&gt;
&lt;/span&gt;      'default': '800w',&lt;span class="w"&gt;
&lt;/span&gt;  },&lt;span class="w"&gt;
&lt;/span&gt;}
&lt;/pre&gt;
&lt;div class="section" id="device-based-responsive-image"&gt;
&lt;h3&gt;Device-based responsive image&lt;/h3&gt;
&lt;p&gt;The &lt;tt class="docutils literal"&gt;crisp&lt;/tt&gt; transformation is an example of a transformation
enabling device-pixel-ratio-based selection.
The &lt;tt class="docutils literal"&gt;srcset&lt;/tt&gt; is a list of tuples, each tuple containing the image description
(&lt;tt class="docutils literal"&gt;'1x'&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;'2x'&lt;/tt&gt;, etc.) and the list of operations to generate the derivative
image from the original image.
The original image is the value of the &lt;tt class="docutils literal"&gt;src&lt;/tt&gt; attribute of the &lt;tt class="docutils literal"&gt;&amp;lt;img&amp;gt;&lt;/tt&gt;.
Image descriptions are hints about the resolution of the associated image
and must have the suffix &lt;tt class="docutils literal"&gt;x&lt;/tt&gt;.
The &lt;tt class="docutils literal"&gt;default&lt;/tt&gt; setting specifies the image to use to replace
the &lt;tt class="docutils literal"&gt;src&lt;/tt&gt; attribute of the image.
This is the image that will be displayed by browsers
that do not support the &lt;tt class="docutils literal"&gt;srcset&lt;/tt&gt; syntax.&lt;/p&gt;
&lt;p&gt;In the two examples above, the default setting is a string referring to one
of the images in the &lt;tt class="docutils literal"&gt;srcset&lt;/tt&gt;.
However, the &lt;tt class="docutils literal"&gt;default&lt;/tt&gt; value could also be a list of operations
to generate a different derivative image.&lt;/p&gt;
&lt;p&gt;Let us modify the &lt;tt class="docutils literal"&gt;:class:&lt;/tt&gt; optional field of the &lt;tt class="docutils literal"&gt;galleria&lt;/tt&gt; directive:&lt;/p&gt;
&lt;pre class="code rst literal-block"&gt;
&lt;span class="p"&gt;..&lt;/span&gt; &lt;span class="ow"&gt;galleria&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;   tiryns.jpg&lt;span class="w"&gt;
&lt;/span&gt;   boxers.jpg&lt;span class="w"&gt;
&lt;/span&gt;   swallows.jpg&lt;span class="w"&gt;
&lt;/span&gt;   caryatid.jpg&lt;span class="w"&gt;
&lt;/span&gt;   &lt;span class="nc"&gt;:class:&lt;/span&gt; crisp
&lt;/pre&gt;
&lt;p&gt;We obtain:&lt;/p&gt;
  &lt;ul class="galleria"
  &gt;
      &lt;li&gt;
&lt;!-- SITEURL              = . --&gt;
&lt;!-- image_relative_path  = images/tiryns.jpg --&gt;
&lt;!-- image_full_path      = /home/hesse/dvt-perso/galleria/doc/content/images/tiryns.jpg --&gt;
&lt;!-- image_replace        = ./images/process/crisp/1x/tiryns.jpg --&gt;
&lt;!-- image_sizes          =  --&gt;
&lt;!-- image_srcset         = ./images/process/crisp/1x/tiryns.jpg 1x, ./images/process/crisp/2x/tiryns.jpg 2x, ./images/process/crisp/3x/tiryns.jpg 3x --&gt;
&lt;!-- image_sources        = None --&gt;
&lt;!-- image_caption        =  --&gt;
&lt;!-- image_target         =  --&gt;
&lt;!-- image_class          = crisp --&gt;
&lt;!-- image_type           = responsive-image --&gt;
&lt;!-- max_height           = 600px --&gt;
&lt;!-- options              = {'class': 'crisp', 'max-height': '600px', 'type': 'responsive-image'} --&gt;
&lt;!-- single_image         =  --&gt;
&lt;figure&gt;
    &lt;a href="./images/tiryns.jpg"&gt;
      &lt;img
          src="./images/process/crisp/1x/tiryns.jpg"
          srcset="./images/process/crisp/1x/tiryns.jpg 1x, ./images/process/crisp/2x/tiryns.jpg 2x, ./images/process/crisp/3x/tiryns.jpg 3x"
          style="max-width: 100%; height: auto; max-height: min(100vh, 600px);"
      &gt;
    &lt;/a&gt;
&lt;/figure&gt;      &lt;/li&gt;
      &lt;li&gt;
&lt;!-- SITEURL              = . --&gt;
&lt;!-- image_relative_path  = images/boxers.jpg --&gt;
&lt;!-- image_full_path      = /home/hesse/dvt-perso/galleria/doc/content/images/boxers.jpg --&gt;
&lt;!-- image_replace        = ./images/process/crisp/1x/boxers.jpg --&gt;
&lt;!-- image_sizes          =  --&gt;
&lt;!-- image_srcset         = ./images/process/crisp/1x/boxers.jpg 1x, ./images/process/crisp/2x/boxers.jpg 2x, ./images/process/crisp/3x/boxers.jpg 3x --&gt;
&lt;!-- image_sources        = None --&gt;
&lt;!-- image_caption        =  --&gt;
&lt;!-- image_target         =  --&gt;
&lt;!-- image_class          = crisp --&gt;
&lt;!-- image_type           = responsive-image --&gt;
&lt;!-- max_height           = 600px --&gt;
&lt;!-- options              = {'class': 'crisp', 'max-height': '600px', 'type': 'responsive-image'} --&gt;
&lt;!-- single_image         =  --&gt;
&lt;figure&gt;
    &lt;a href="./images/boxers.jpg"&gt;
      &lt;img
          src="./images/process/crisp/1x/boxers.jpg"
          srcset="./images/process/crisp/1x/boxers.jpg 1x, ./images/process/crisp/2x/boxers.jpg 2x, ./images/process/crisp/3x/boxers.jpg 3x"
          style="max-width: 100%; height: auto; max-height: min(100vh, 600px);"
      &gt;
    &lt;/a&gt;
&lt;/figure&gt;      &lt;/li&gt;
      &lt;li&gt;
&lt;!-- SITEURL              = . --&gt;
&lt;!-- image_relative_path  = images/swallows.jpg --&gt;
&lt;!-- image_full_path      = /home/hesse/dvt-perso/galleria/doc/content/images/swallows.jpg --&gt;
&lt;!-- image_replace        = ./images/process/crisp/1x/swallows.jpg --&gt;
&lt;!-- image_sizes          =  --&gt;
&lt;!-- image_srcset         = ./images/process/crisp/1x/swallows.jpg 1x, ./images/process/crisp/2x/swallows.jpg 2x, ./images/process/crisp/3x/swallows.jpg 3x --&gt;
&lt;!-- image_sources        = None --&gt;
&lt;!-- image_caption        =  --&gt;
&lt;!-- image_target         =  --&gt;
&lt;!-- image_class          = crisp --&gt;
&lt;!-- image_type           = responsive-image --&gt;
&lt;!-- max_height           = 600px --&gt;
&lt;!-- options              = {'class': 'crisp', 'max-height': '600px', 'type': 'responsive-image'} --&gt;
&lt;!-- single_image         =  --&gt;
&lt;figure&gt;
    &lt;a href="./images/swallows.jpg"&gt;
      &lt;img
          src="./images/process/crisp/1x/swallows.jpg"
          srcset="./images/process/crisp/1x/swallows.jpg 1x, ./images/process/crisp/2x/swallows.jpg 2x, ./images/process/crisp/3x/swallows.jpg 3x"
          style="max-width: 100%; height: auto; max-height: min(100vh, 600px);"
      &gt;
    &lt;/a&gt;
&lt;/figure&gt;      &lt;/li&gt;
      &lt;li&gt;
&lt;!-- SITEURL              = . --&gt;
&lt;!-- image_relative_path  = images/caryatid.jpg --&gt;
&lt;!-- image_full_path      = /home/hesse/dvt-perso/galleria/doc/content/images/caryatid.jpg --&gt;
&lt;!-- image_replace        = ./images/process/crisp/1x/caryatid.jpg --&gt;
&lt;!-- image_sizes          =  --&gt;
&lt;!-- image_srcset         = ./images/process/crisp/1x/caryatid.jpg 1x, ./images/process/crisp/2x/caryatid.jpg 2x, ./images/process/crisp/3x/caryatid.jpg 3x --&gt;
&lt;!-- image_sources        = None --&gt;
&lt;!-- image_caption        =  --&gt;
&lt;!-- image_target         =  --&gt;
&lt;!-- image_class          = crisp --&gt;
&lt;!-- image_type           = responsive-image --&gt;
&lt;!-- max_height           = 600px --&gt;
&lt;!-- options              = {'class': 'crisp', 'max-height': '600px', 'type': 'responsive-image'} --&gt;
&lt;!-- single_image         =  --&gt;
&lt;figure&gt;
    &lt;a href="./images/caryatid.jpg"&gt;
      &lt;img
          src="./images/process/crisp/1x/caryatid.jpg"
          srcset="./images/process/crisp/1x/caryatid.jpg 1x, ./images/process/crisp/2x/caryatid.jpg 2x, ./images/process/crisp/3x/caryatid.jpg 3x"
          style="max-width: 100%; height: auto; max-height: min(100vh, 600px);"
      &gt;
    &lt;/a&gt;
&lt;/figure&gt;      &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="viewport-based-responsive-image"&gt;
&lt;h3&gt;Viewport-based responsive image&lt;/h3&gt;
&lt;p&gt;The &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;responsive-medium&lt;/span&gt;&lt;/tt&gt; transformation is an example of a transformation
enabling viewport-based selection.
The &lt;tt class="docutils literal"&gt;sizes&lt;/tt&gt; contains a rule to compute the width of the displayed image
from the width of the viewport.
Once the browser knows the image width, it will select an image source from the
&lt;tt class="docutils literal"&gt;srcset&lt;/tt&gt;. The &lt;tt class="docutils literal"&gt;srcset&lt;/tt&gt; is a list of tuple, each tuple containing the image
description (&lt;tt class="docutils literal"&gt;'600w'&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;'800w'&lt;/tt&gt;, etc.) and the list of operations to generate
the derivative image from the original image.
The original image is the value of the &lt;tt class="docutils literal"&gt;src&lt;/tt&gt; attribute of the &lt;tt class="docutils literal"&gt;&amp;lt;img&amp;gt;&lt;/tt&gt;.
Image descriptions are hints about the width in pixels of the associated image
and must have the suffix &lt;tt class="docutils literal"&gt;w&lt;/tt&gt;.
The &lt;tt class="docutils literal"&gt;default&lt;/tt&gt; setting specifies the image to use to replace the
&lt;tt class="docutils literal"&gt;src&lt;/tt&gt; attribute of the image by a pre-computed one.&lt;/p&gt;
&lt;p&gt;Let us modify again the &lt;tt class="docutils literal"&gt;:class:&lt;/tt&gt; optional field of the &lt;tt class="docutils literal"&gt;galleria&lt;/tt&gt; directive:&lt;/p&gt;
&lt;pre class="code rst literal-block"&gt;
&lt;span class="p"&gt;..&lt;/span&gt; &lt;span class="ow"&gt;galleria&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;   tiryns.jpg&lt;span class="w"&gt;
&lt;/span&gt;   boxers.jpg&lt;span class="w"&gt;
&lt;/span&gt;   swallows.jpg&lt;span class="w"&gt;
&lt;/span&gt;   caryatid.jpg&lt;span class="w"&gt;
&lt;/span&gt;   &lt;span class="nc"&gt;:class:&lt;/span&gt; responsive-medium
&lt;/pre&gt;
&lt;p&gt;We obtain:&lt;/p&gt;
  &lt;ul class="galleria"
  &gt;
      &lt;li&gt;
&lt;!-- SITEURL              = . --&gt;
&lt;!-- image_relative_path  = images/tiryns.jpg --&gt;
&lt;!-- image_full_path      = /home/hesse/dvt-perso/galleria/doc/content/images/tiryns.jpg --&gt;
&lt;!-- image_replace        = ./images/process/responsive-medium/800w/tiryns.jpg --&gt;
&lt;!-- image_sizes          = (min-width: 768px) 650px, (min-width: 1200px) 800px, 100vw --&gt;
&lt;!-- image_srcset         = ./images/process/responsive-medium/600w/tiryns.jpg 600w, ./images/process/responsive-medium/800w/tiryns.jpg 800w --&gt;
&lt;!-- image_sources        = None --&gt;
&lt;!-- image_caption        =  --&gt;
&lt;!-- image_target         =  --&gt;
&lt;!-- image_class          = responsive-medium --&gt;
&lt;!-- image_type           = responsive-image --&gt;
&lt;!-- max_height           = 600px --&gt;
&lt;!-- options              = {'class': 'responsive-medium', 'max-height': '600px', 'type': 'responsive-image'} --&gt;
&lt;!-- single_image         =  --&gt;
&lt;figure&gt;
    &lt;a href="./images/tiryns.jpg"&gt;
      &lt;img
          sizes="(min-width: 768px) 650px, (min-width: 1200px) 800px, 100vw"
          src="./images/process/responsive-medium/800w/tiryns.jpg"
          srcset="./images/process/responsive-medium/600w/tiryns.jpg 600w, ./images/process/responsive-medium/800w/tiryns.jpg 800w"
          style="max-width: 100%; height: auto; max-height: min(100vh, 600px);"
      &gt;
    &lt;/a&gt;
&lt;/figure&gt;      &lt;/li&gt;
      &lt;li&gt;
&lt;!-- SITEURL              = . --&gt;
&lt;!-- image_relative_path  = images/boxers.jpg --&gt;
&lt;!-- image_full_path      = /home/hesse/dvt-perso/galleria/doc/content/images/boxers.jpg --&gt;
&lt;!-- image_replace        = ./images/process/responsive-medium/800w/boxers.jpg --&gt;
&lt;!-- image_sizes          = (min-width: 768px) 650px, (min-width: 1200px) 800px, 100vw --&gt;
&lt;!-- image_srcset         = ./images/process/responsive-medium/600w/boxers.jpg 600w, ./images/process/responsive-medium/800w/boxers.jpg 800w --&gt;
&lt;!-- image_sources        = None --&gt;
&lt;!-- image_caption        =  --&gt;
&lt;!-- image_target         =  --&gt;
&lt;!-- image_class          = responsive-medium --&gt;
&lt;!-- image_type           = responsive-image --&gt;
&lt;!-- max_height           = 600px --&gt;
&lt;!-- options              = {'class': 'responsive-medium', 'max-height': '600px', 'type': 'responsive-image'} --&gt;
&lt;!-- single_image         =  --&gt;
&lt;figure&gt;
    &lt;a href="./images/boxers.jpg"&gt;
      &lt;img
          sizes="(min-width: 768px) 650px, (min-width: 1200px) 800px, 100vw"
          src="./images/process/responsive-medium/800w/boxers.jpg"
          srcset="./images/process/responsive-medium/600w/boxers.jpg 600w, ./images/process/responsive-medium/800w/boxers.jpg 800w"
          style="max-width: 100%; height: auto; max-height: min(100vh, 600px);"
      &gt;
    &lt;/a&gt;
&lt;/figure&gt;      &lt;/li&gt;
      &lt;li&gt;
&lt;!-- SITEURL              = . --&gt;
&lt;!-- image_relative_path  = images/swallows.jpg --&gt;
&lt;!-- image_full_path      = /home/hesse/dvt-perso/galleria/doc/content/images/swallows.jpg --&gt;
&lt;!-- image_replace        = ./images/process/responsive-medium/800w/swallows.jpg --&gt;
&lt;!-- image_sizes          = (min-width: 768px) 650px, (min-width: 1200px) 800px, 100vw --&gt;
&lt;!-- image_srcset         = ./images/process/responsive-medium/600w/swallows.jpg 600w, ./images/process/responsive-medium/800w/swallows.jpg 800w --&gt;
&lt;!-- image_sources        = None --&gt;
&lt;!-- image_caption        =  --&gt;
&lt;!-- image_target         =  --&gt;
&lt;!-- image_class          = responsive-medium --&gt;
&lt;!-- image_type           = responsive-image --&gt;
&lt;!-- max_height           = 600px --&gt;
&lt;!-- options              = {'class': 'responsive-medium', 'max-height': '600px', 'type': 'responsive-image'} --&gt;
&lt;!-- single_image         =  --&gt;
&lt;figure&gt;
    &lt;a href="./images/swallows.jpg"&gt;
      &lt;img
          sizes="(min-width: 768px) 650px, (min-width: 1200px) 800px, 100vw"
          src="./images/process/responsive-medium/800w/swallows.jpg"
          srcset="./images/process/responsive-medium/600w/swallows.jpg 600w, ./images/process/responsive-medium/800w/swallows.jpg 800w"
          style="max-width: 100%; height: auto; max-height: min(100vh, 600px);"
      &gt;
    &lt;/a&gt;
&lt;/figure&gt;      &lt;/li&gt;
      &lt;li&gt;
&lt;!-- SITEURL              = . --&gt;
&lt;!-- image_relative_path  = images/caryatid.jpg --&gt;
&lt;!-- image_full_path      = /home/hesse/dvt-perso/galleria/doc/content/images/caryatid.jpg --&gt;
&lt;!-- image_replace        = ./images/process/responsive-medium/800w/caryatid.jpg --&gt;
&lt;!-- image_sizes          = (min-width: 768px) 650px, (min-width: 1200px) 800px, 100vw --&gt;
&lt;!-- image_srcset         = ./images/process/responsive-medium/600w/caryatid.jpg 600w, ./images/process/responsive-medium/800w/caryatid.jpg 800w --&gt;
&lt;!-- image_sources        = None --&gt;
&lt;!-- image_caption        =  --&gt;
&lt;!-- image_target         =  --&gt;
&lt;!-- image_class          = responsive-medium --&gt;
&lt;!-- image_type           = responsive-image --&gt;
&lt;!-- max_height           = 600px --&gt;
&lt;!-- options              = {'class': 'responsive-medium', 'max-height': '600px', 'type': 'responsive-image'} --&gt;
&lt;!-- single_image         =  --&gt;
&lt;figure&gt;
    &lt;a href="./images/caryatid.jpg"&gt;
      &lt;img
          sizes="(min-width: 768px) 650px, (min-width: 1200px) 800px, 100vw"
          src="./images/process/responsive-medium/800w/caryatid.jpg"
          srcset="./images/process/responsive-medium/600w/caryatid.jpg 600w, ./images/process/responsive-medium/800w/caryatid.jpg 800w"
          style="max-width: 100%; height: auto; max-height: min(100vh, 600px);"
      &gt;
    &lt;/a&gt;
&lt;/figure&gt;      &lt;/li&gt;
  &lt;/ul&gt;
&lt;p&gt;Observe that, when decreasing the window width, both the image layout
and the image resolution are adapted dynamically.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="picture-set"&gt;
&lt;h2&gt;Picture set&lt;/h2&gt;
&lt;p&gt;&lt;a class="reference external" href="https://galleria.artliba.org"&gt;Galleria&lt;/a&gt; can be used to generate the images used by a &lt;tt class="docutils literal"&gt;&amp;lt;picture&amp;gt;&lt;/tt&gt; tag.
The &lt;tt class="docutils literal"&gt;&amp;lt;picture&amp;gt;&lt;/tt&gt; syntax allows for more flexibility in providing a choice
of image to the browser.
Again, you can read more about the &lt;tt class="docutils literal"&gt;picture tag&lt;/tt&gt; for a gentle
introduction to the &lt;tt class="docutils literal"&gt;srcset&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;&amp;lt;picture&amp;gt;&lt;/tt&gt; syntaxes.&lt;/p&gt;
&lt;p&gt;To tell &lt;tt class="docutils literal"&gt;galleria&lt;/tt&gt; to generate the images for a &lt;tt class="docutils literal"&gt;&amp;lt;picture&amp;gt;&lt;/tt&gt;,
add a &lt;tt class="docutils literal"&gt;picture&lt;/tt&gt; entry to your &lt;tt class="docutils literal"&gt;GALLERIA_PROCESS&lt;/tt&gt;
dictionary with the following syntax:&lt;/p&gt;
&lt;pre class="code rst literal-block"&gt;
GALLERIA_PROCESS = {&lt;span class="w"&gt;
&lt;/span&gt;  'picture-tag': {&lt;span class="w"&gt;
&lt;/span&gt;     'type': 'picture',&lt;span class="w"&gt;
&lt;/span&gt;     'sources': [&lt;span class="w"&gt;
&lt;/span&gt;         {&lt;span class="w"&gt;
&lt;/span&gt;             'name': 'default',&lt;span class="w"&gt;
&lt;/span&gt;             'media': '(min-width: 640px)',&lt;span class="w"&gt;
&lt;/span&gt;             'srcset': [&lt;span class="w"&gt;
&lt;/span&gt;                 ( '640w', [ '640x480',  '+profile &amp;quot;*&amp;quot;']),&lt;span class="w"&gt;
&lt;/span&gt;                 ('1024w', ['1024x683',  '+profile &amp;quot;*&amp;quot;']),&lt;span class="w"&gt;
&lt;/span&gt;                 ('1600w', ['1600x1200', '+profile &amp;quot;*&amp;quot;']),&lt;span class="w"&gt;
&lt;/span&gt;             ],&lt;span class="w"&gt;
&lt;/span&gt;             'sizes': '100vw',&lt;span class="w"&gt;
&lt;/span&gt;         },&lt;span class="w"&gt;
&lt;/span&gt;         {&lt;span class="w"&gt;
&lt;/span&gt;             'name': 'source-1',&lt;span class="w"&gt;
&lt;/span&gt;             'srcset': [&lt;span class="w"&gt;
&lt;/span&gt;                 ('1x', ['200x200']),&lt;span class="w"&gt;
&lt;/span&gt;                 ('2x', ['300x300']),&lt;span class="w"&gt;
&lt;/span&gt;             ]&lt;span class="w"&gt;
&lt;/span&gt;         },&lt;span class="w"&gt;
&lt;/span&gt;     ],&lt;span class="w"&gt;
&lt;/span&gt;     'default': ('default', '640w'),&lt;span class="w"&gt;
&lt;/span&gt;  },&lt;span class="w"&gt;
&lt;/span&gt;}
&lt;/pre&gt;
&lt;p&gt;Each of the &lt;tt class="docutils literal"&gt;sources&lt;/tt&gt; entries is very similar to the &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;responsive-image&lt;/span&gt;&lt;/tt&gt;
describe above.
Here, each source must have a &lt;tt class="docutils literal"&gt;name&lt;/tt&gt;, which will be used to find the &lt;tt class="docutils literal"&gt;url&lt;/tt&gt;
of the original image for this source in your article.
The source may also have a &lt;tt class="docutils literal"&gt;media&lt;/tt&gt;, which contains a rule used by the browser
to select the active source.
The &lt;tt class="docutils literal"&gt;default&lt;/tt&gt; setting specifies the image to use to replace the
&lt;tt class="docutils literal"&gt;src&lt;/tt&gt; attribute of the &lt;tt class="docutils literal"&gt;&amp;lt;img&amp;gt;&lt;/tt&gt; inside the &lt;tt class="docutils literal"&gt;&amp;lt;picture&amp;gt;&lt;/tt&gt;.
This is the image that will be displayed by browsers that do not support
the &lt;tt class="docutils literal"&gt;&amp;lt;picture&amp;gt;&lt;/tt&gt; syntax.
In this example, it will use the image &lt;tt class="docutils literal"&gt;640w&lt;/tt&gt; from the source &lt;tt class="docutils literal"&gt;default&lt;/tt&gt;.
A list of operations could have been specified instead of 640w.&lt;/p&gt;
&lt;p&gt;Let us modify again the &lt;tt class="docutils literal"&gt;:class:&lt;/tt&gt; optional field of the &lt;tt class="docutils literal"&gt;galleria&lt;/tt&gt; directive:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
..&lt;span class="w"&gt; &lt;/span&gt;galleria::&lt;span class="w"&gt;
   &lt;/span&gt;tiryns.jpg&lt;span class="w"&gt;
   &lt;/span&gt;boxers.jpg&lt;span class="w"&gt;
   &lt;/span&gt;swallows.jpg&lt;span class="w"&gt;
   &lt;/span&gt;caryatid.jpg&lt;span class="w"&gt;
   &lt;/span&gt;:class:&lt;span class="w"&gt; &lt;/span&gt;picture-tag
&lt;/pre&gt;
&lt;p&gt;and we obtain the illustration presented at the beginning of the
&lt;a class="reference external" href="1a-getting-started.html"&gt;introduction section&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="additional-settings"&gt;
&lt;h2&gt;Additional settings&lt;/h2&gt;
&lt;p&gt;When no class is specified in a &lt;tt class="docutils literal"&gt;galleria directive&lt;/tt&gt;,
a class defined in the &lt;tt class="docutils literal"&gt;GALLERIA_PROCESS&lt;/tt&gt; dictionary is used
by default: this user-defined default class should be specified
in the &lt;tt class="docutils literal"&gt;GALLERIA_DEFAULT_CLASS&lt;/tt&gt; variable of the &lt;tt class="docutils literal"&gt;pelicanconf.py&lt;/tt&gt; file.&lt;/p&gt;
&lt;p&gt;The &lt;tt class="docutils literal"&gt;galleria&lt;/tt&gt; directive has a &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;max-height&lt;/span&gt;&lt;/tt&gt; option.
When this option is not specified, the default value is provided by
the &lt;tt class="docutils literal"&gt;GALLERIA_DEFAULT_MAX_HEIGHT&lt;/tt&gt; variable.&lt;/p&gt;
&lt;p&gt;Pelican pages and article could provide an &lt;tt class="docutils literal"&gt;:image:&lt;/tt&gt; in the meta-data section.
Themes such as &lt;tt class="docutils literal"&gt;lepagito&lt;/tt&gt; use this image to automatically
produce an icon associated to this page or article, and this icon
is then used in the archive section.
This icon is automatically generated from an original image
by specifying its class in the &lt;tt class="docutils literal"&gt;GALLERIA_ICON_CLASS&lt;/tt&gt; variable.&lt;/p&gt;
&lt;p&gt;By default, the new images will be stored in a directory named
&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;output/process/&amp;lt;class-name&amp;gt;&lt;/span&gt;&lt;/tt&gt; in the output folder.
All the transformations are written in the output directory
in order to avoid confusion with the source files
or if we test multiple transformations.
You can replace the directory name &lt;tt class="docutils literal"&gt;process&lt;/tt&gt; by something else
using the &lt;tt class="docutils literal"&gt;GALLERIA_PROCESS_DIR&lt;/tt&gt; variable.&lt;/p&gt;
&lt;p&gt;&lt;tt class="docutils literal"&gt;Galleria&lt;/tt&gt; is able to efficiently process all the image transformation in parallel:
use the &lt;tt class="docutils literal"&gt;GALLERIA_RESIZE_JOBS&lt;/tt&gt; variable to do that. Its default value is 1
and then no parallel computations are done.
Setting it to 0 means that the number of parallel process is determined
automatically, depending on your computer. Also, you could fix it
directly, e.g. to 10.&lt;/p&gt;
&lt;/div&gt;
</content><category term="Config"></category><category term="pelicanconf.py"></category><category term="install"></category></entry></feed>