Problem/Motivation

Currently the img tag is in the Twig template, this means it can't be altered by a preprocess (for example to add new attributes).

Proposed resolution

If brand_image was a render array containing the entire image, it could be more easily altered.

Issue fork gin_login-3419286

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

prudloff created an issue. See original summary.

prudloff’s picture

Status: Active » Needs review

I also added lazy loading so that mobile browsers can avoid loading the image if they don't display it.

arousseau’s picture

Status: Needs review » Reviewed & tested by the community

The MR applies cleanly to 2.1.3 and the image works as expected, using the render array and lazy loading.

jwilson3’s picture

It seems like this may introduce discrepancy between the IMG tag used for the single default image versus the random wallpaper setting (handled by client-side js/wallpaper.js) which contains nothing more than the src and (empty) alt attributes.

jurgenhaas’s picture

Version: 2.0.x-dev » 2.1.x-dev
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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