function views_post_update_image_lazy_load
Add lazy load options to all image type field configurations.
File
-
core/
modules/ views/ views.post_update.php, line 101
Code
function views_post_update_image_lazy_load(?array &$sandbox = NULL) : void {
/** @var \Drupal\views\ViewsConfigUpdater $view_config_updater */
$view_config_updater = \Drupal::classResolver(ViewsConfigUpdater::class);
\Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'view', function (ViewEntityInterface $view) use ($view_config_updater) : bool {
return $view_config_updater->needsImageLazyLoadFieldUpdate($view);
}, TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.