Image

Background Image Loading Eager

Loading Lazy Attribute

Image

Picture with Srcset

Background Image

Background Image

Background Image with Srcset

Background Picture

Background Picture with Srcset

Background Picture with Multiple Sources

gls-img with Image element (Deprecated)

Image

Picture with Srcset

  • Heading

    Lorem ipsum dolor sit amet.

  • Heading

    Lorem ipsum dolor sit amet.

  • Heading

    Lorem ipsum dolor sit amet.

  • Heading

    Lorem ipsum dolor sit amet.

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

JavaScript Options

Option Value Default Description
dataSrc String '' The image's `src` attribute.
sources String '' The image's sources. This option is used for background images only. The sources attributes be passed in `key: value;` format for a single source. For multiple sources in JSON format.
loading `lazy`|`eager` `lazy` Enable lazy/eager loading. Set to `eager` for images within the first visible viewport.
offsetTop String '50vh' The offset increases the viewport's bounding box vertically, before computing an intersection with the image.
offsetLeft String 0 The offset increases the viewport's bounding box horizontally, before computing an intersection with the image.
target String false A list of targets who's bounding boxes will be used to compute an intersection with the image. (Defaults to the image itself)