Problem/Motivation

The VLSuite layout media background is always rendered using the hard-coded vlsuite_background view mode with no way for a site to render it with a different view mode depending on context.

It would be nice to allow adding specific view modes, for example, as vlsuite_background view mode sets loading=lazy, and this is problematic for blocks that can act as the LCP element.

lighthouse feedback about lcp

Proposed resolution

Introduce a new alter hook allowing custom modules to define block_content entities that can use a different media view mode

CommentFileSizeAuthor
lighthouse-lcp.png22.14 KBalejandro cabarcos

Issue fork vlsuite-3616402

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alejandro cabarcos created an issue. See original summary.

alejandro cabarcos’s picture

Issue summary: View changes

omarlopesino’s picture

Status: Active » Needs review

Needs to be ported to 4.x and ideally to 3.x

omarlopesino’s picture

Status: Needs review » Needs work
omarlopesino’s picture

Title: Allow media background to have fetchpriority=high for LCP improvements » Allow custom modules alter media background
Issue summary: View changes
omarlopesino’s picture

Title: Allow custom modules alter media background » Allow custom modules alter sections media background