Skip to content

Conversation

@hylkest
Copy link

@hylkest hylkest commented Oct 14, 2025

What does it do?

I changed the extension from .svg to .png and uploaded a new png logo

Why is it needed?

Some email providers for example Gmail are blocking .svg images in their email. So the image won't load if you view it in gmail.

How to test

Use the "Let the user choose their own password via email" option for example and check the email in gmail. The image won't load

Screenshot 2025-10-14 at 14 13 59

$this->setPlaceholder('background', $background);

$logo = $this->modx->getOption('login_logo', null, $managerUrl . 'templates/' . $managerTheme . '/images/modx-logo-color.svg', true);
$logo = $this->modx->getOption('login_logo', null, $managerUrl . 'templates/' . $managerTheme . '/images/modx-logo-color.png', true);
Copy link
Collaborator

@smg6511 smg6511 Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually the wrong place to change this, as this is for the web UI not the email html. You need to alter the email template at manager/templates/default/email/default.tpl. But, it'd be preferable to provide the png as a fallback to the svg, maybe trying something like:

<img 
     src="{$_config.url_scheme}{$_config.http_host}{$_config.manager_url}templates/default/images/modx-logo-color.png" 
     alt="{$_config.site_name}"
     srcset="{$_config.url_scheme}{$_config.http_host}{$_config.manager_url}templates/default/images/modx-logo-color.svg" 
>

I'd also suggest providing the PNG at a minimum of 2x size (~440px wide), maybe even 3x (~650px). It's sized down in the css, so no worries on physical size; this will give it a sharper appearance on the mostly high-dpi devices the message will be read with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants