Created on 21 February 2025, 7 months ago

In contrib/dxpr_theme/templates/block--system-branding-block.html.twig

Add

<img id="logo" src="{{ site_logo }}" alt="{{ 'Home'|t }}" loading="lazy" />

And allow to change a logo image in webp format

Feature request
Status

Active

Version

6.0

Component

Code

Created by

🇫🇷France chsdaiguil Coteaux-du-lyonnais

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @chsdaiguil
  • First commit to issue fork.
  • 🇮🇳India ggh

    Updated the twig and modified to allow webp format logo

  • 🇫🇷France chsdaiguil Coteaux-du-lyonnais

    Google's tester (PageSpeed ​​Insights) also asks for the image size.

    Image elements do not have an explicit width or height
    

    It seems complicated to add it here, because the image format changes depending on whether you are on the desktop or on the mobile

  • Status changed to Closed: won't fix 28 days ago
  • 🇧🇦Bosnia and Herzegovina drale01 Sarajevo

    Thanks for the proposal and patch. We attempted to apply the patch on DXPR Theme 6.0.2 via cweagans/composer-patches, but it fails with “Cannot apply patch …”, likely due to context/path changes (e.g., block--system-branding-block.html.twig, theme-settings.php). Separately, while serving images as WebP is beneficial, we don’t consider lazy-loading the site logo appropriate; the logo is part of the first paint/brand identity and should render eagerly (e.g., loading="eager" and possibly fetchpriority="high"). Our preference is to limit lazy loading to content images, not the branding logo.

Production build 0.71.5 2024