By default Drupal will lazyload images using the loading="lazy" attribute. This attribute is now configurable within the field formatter (see https://www.drupal.org/node/3272098).

The Standard Profile's article content type has an image that is displayed above the content within the full view mode. Because it is above the content it should not be lazyloaded (see https://web.dev/lazy-loading-best-practices/).

It's a simple configuration change that needs to be made, but we should go ahead and do so.

Issue fork drupal-3371796

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

mherchel created an issue. See original summary.

bernardm28’s picture

StatusFileSize
new1.01 KB

Here is a patch for it.

bernardm28’s picture

StatusFileSize
new3.35 KB
bernardm28’s picture

bernardm28’s picture

Status: Active » Needs review

The MR is ready for review.
I did both the patch and MR but the MR is better go for that one.

mherchel’s picture

Title: Olivero: Article content type's image should not be lazy loaded within full view mode » Standard profile's article content type's image should not be lazy loaded within full view mode
Component: Olivero theme » base system
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Yeah the code is slightly different (the patch contains a UUID, which isn't necessary).

Anyway, the MR looks correct. There is a slight re-ordering, but I don't think that matters.

I'm also updating the component, IS, and title as this has more to do with the standard profile than Olivero.

mherchel’s picture

bernardm28’s picture

Yeah its interesting the patch does that. Because the first one I made it manually with git and the second I download it doing this
https://git.drupalcode.org/project/drupal/-/merge_requests/4304/diffs.patch
I guess the second one does a patch with all the commits and not the latest commit.
But it does not matter. The if the MR is fine we are good to go.

  • lauriii committed f98b337b on 11.x
    Issue #3371796 by bernardm28, mherchel: Standard profile's article...

lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Committed f98b337 and pushed to 11.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.