Skip to content

JS API ​

The FigureGlide class extends the Figure class and formats image sources for the League Glide API.

Options ​

step ​

  • Type: number
  • Default: 100

The step of the size grid. The size of the image, multiplied by the device pixel ratio, is rounded up to a multiple of this value. Default to 100, which means that a size of 320×380 will be rounded to 400×400.

maxSize ​

  • Type: number
  • Default: 2600

The largest width or height to request. A larger size is scaled down with the ratio of the image, then rounded to the grid again, but not above this value.

fit ​

  • Type: string
  • Default: ''

Sets the fit parameter of the URL, for example crop or contain. When empty, the fit parameter of the source stays as it is.

fm ​

  • Type: string
  • Default: ''

Sets the fm parameter of the URL, for example webp or avif. When empty, the fm parameter of the source stays as it is.

disable ​

  • Type: boolean
  • Default: false

Disables the features of this component: the image loads the data-src URL as it is.