Skip to content

Commit

Permalink
Fix images and oembed videos to be lazy loading
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Mar 15, 2024
1 parent fe58408 commit b1e4493
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
14 changes: 12 additions & 2 deletions config/sync/core.entity_view_display.media.image.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
20 changes: 15 additions & 5 deletions config/sync/core.entity_view_display.media.video.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion config/sync/core.entity_view_display.media.video.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ content:
max_width: 0
max_height: 0
loading:
attribute: eager
attribute: lazy
third_party_settings: { }
weight: 0
region: content
Expand Down
1 change: 0 additions & 1 deletion config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ module:
nobots: 0
node: 0
node_revision_delete: 0
oembed_lazyload: 0
oembed_providers: 0
options: 0
page_cache: 0
Expand Down

0 comments on commit b1e4493

Please sign in to comment.