function blazy_preprocess_field in Blazy 8
Same name and namespace in other branches
- 8.2 blazy.module \blazy_preprocess_field()
- 7 blazy.runtime.inc \blazy_preprocess_field()
Implements hook_preprocess_field().
File
- ./
blazy.module, line 55 - Provides basic Blazy integration for lazy loading and multi-serving images.
Code
function blazy_preprocess_field(array &$variables) {
// Only proceed if an image field and using Blazy formatter.
if (isset($variables['element']['#blazy'])) {
Blazy::containerAttributes($variables['attributes'], $variables['element']['#blazy']);
}
}