From b1e4493fa08f5d934da472ad071d502130ae637f Mon Sep 17 00:00:00 2001 From: Mike Decker Date: Fri, 15 Mar 2024 09:21:34 -0700 Subject: [PATCH] Fix images and oembed videos to be lazy loading --- ...ntity_view_display.media.image.default.yml | 14 +++++++++++-- ...ntity_view_display.media.video.default.yml | 20 ++++++++++++++----- ...e.entity_view_display.media.video.full.yml | 2 +- config/sync/core.extension.yml | 1 - 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/config/sync/core.entity_view_display.media.image.default.yml b/config/sync/core.entity_view_display.media.image.default.yml index 0411207b..78e52038 100644 --- a/config/sync/core.entity_view_display.media.image.default.yml +++ b/config/sync/core.entity_view_display.media.image.default.yml @@ -8,6 +8,9 @@ dependencies: - media.type.image - responsive_image.styles.full_responsive module: + - empty_fields + - field_formatter_class + - field_label - responsive_image _core: default_config_hash: 4Ny-qpsNb-KZOCogLHV8JHe6zj4XdpwpDi_eu-qFVCs @@ -23,8 +26,15 @@ content: responsive_image_style: full_responsive image_link: '' image_loading: - attribute: eager - third_party_settings: { } + attribute: lazy + third_party_settings: + empty_fields: + handler: '' + field_formatter_class: + class: '' + field_label: + label_value: '' + label_tag: '' weight: 0 region: content hidden: diff --git a/config/sync/core.entity_view_display.media.video.default.yml b/config/sync/core.entity_view_display.media.video.default.yml index 8e317348..2bbd5410 100644 --- a/config/sync/core.entity_view_display.media.video.default.yml +++ b/config/sync/core.entity_view_display.media.video.default.yml @@ -7,7 +7,10 @@ dependencies: - field.field.media.video.su_media_category - media.type.video module: - - oembed_lazyload + - empty_fields + - field_formatter_class + - field_label + - media _core: default_config_hash: Lcpr93rB3W6kcI48KJ3MhzP4Kg3HObfdAS8RDpoIyTg id: media.video.default @@ -16,14 +19,21 @@ bundle: video mode: default content: field_media_oembed_video: - type: lazyload_oembed + type: oembed label: hidden settings: max_width: 0 max_height: 0 - strategy: intersection_observer - intersection_observer_margin: '' - third_party_settings: { } + loading: + attribute: lazy + third_party_settings: + empty_fields: + handler: '' + field_formatter_class: + class: '' + field_label: + label_value: '' + label_tag: '' weight: 0 region: content hidden: diff --git a/config/sync/core.entity_view_display.media.video.full.yml b/config/sync/core.entity_view_display.media.video.full.yml index 3cf3b781..2002f71c 100644 --- a/config/sync/core.entity_view_display.media.video.full.yml +++ b/config/sync/core.entity_view_display.media.video.full.yml @@ -23,7 +23,7 @@ content: max_width: 0 max_height: 0 loading: - attribute: eager + attribute: lazy third_party_settings: { } weight: 0 region: content diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index ef7d97f2..a357509f 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -139,7 +139,6 @@ module: nobots: 0 node: 0 node_revision_delete: 0 - oembed_lazyload: 0 oembed_providers: 0 options: 0 page_cache: 0