load metadata specifies when a browser loads images which are linked in a webpage. The value that is assigned to the
load metadata name must be a recognized value. If
load is not declared, all except the first two images in a webpage are loaded lazily by default.
Available in Aneamal 29 and later:
- This value causes all images which are linked with either
[j]in the file to load immediately when a reader accesses the webpage – including those images which can not be seen, because the reader has not scrolled down to them.
- This value causes images which are linked with either
[j]in the file to load only when a reader scrolls near them on the webpage. This avoids loading images that are not viewed, thereby saves bandwidth and reduces the initial load time. But quick scrolling can result in images becoming visible before they have finished loading.
- The first two images in the webpage that are linked with either
[j]are loaded eagerly, the rest lazily. This is the default behavior, so normally you do not need to declare this value. It is useful for causing the default behavior in a file within a directory for which you have declared a different value in @meta.nml.
@ load: lazy
load metadata is declared, the Aneamal Translator adds a HTML loading attribute to all img elements in the HTML output to trigger the desired browser behavior, for example:
<img src='/dog.jpg' width='640' height='480' loading='lazy'>