function image_post_update_image_loading_attribute
Add the image loading attribute setting to image field formatter instances.
File
-
core/
modules/ image/ image.post_update.php, line 25
Code
function image_post_update_image_loading_attribute(?array &$sandbox = NULL) : void {
$image_config_updater = \Drupal::classResolver(ImageConfigUpdater::class);
\Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'entity_view_display', function (EntityViewDisplayInterface $view_display) use ($image_config_updater) : bool {
return $image_config_updater->processImageLazyLoad($view_display);
});
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.