You are here

function blazy_preprocess_responsive_image in Blazy 8

Same name and namespace in other branches
  1. 8.2 blazy.module \blazy_preprocess_responsive_image()

Overrides variables for responsive-image.html.twig templates.

File

./blazy.module, line 46
Provides basic Blazy integration for lazy loading and multi-serving images.

Code

function blazy_preprocess_responsive_image(&$variables) {
  if (isset($variables['attributes']['data-b-lazy'])) {
    Blazy::preprocessResponsiveImage($variables);
  }
}