Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292404

Theme logo image is rendered without dimensions

$
0
0

Problem/Motivation

The logo in olivero is hard-coded. All logos in core are either hard-coded or we _only_ render the image path. Never dimensions. We should. And we might want a holistic solution that passes from theme config the logo and the logo dimensions. For good measure, we could even add loading="eager". That's the default, but adding it is more explicit and instructive.

Steps to reproduce

Inspect the HTML source for the logo, and see the width and height attributes are not included.

Proposed resolution

Use the image factory to render the img tag including the width and height attributes.

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

An additional variable is included to render the theme logo, <code>site_logo_rendered. The variable site_logo for the system branding block uses the file path. The new site_logo_rendered variable renders the <img> tag including attributes, i.e. width and height. Module and theme maintainers should consider usages of site_logo to determine if site_logo_rendered would be more appropriate.


Viewing all articles
Browse latest Browse all 292404

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>