Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove logo preload when header logo disabled #686

Merged
merged 2 commits into from
Apr 8, 2024
Merged

Conversation

e-five256
Copy link
Member

Noticed the following in console when Header logo is disabled in the admin settings

The resource /mbin_logo.svg was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.

this makes it only preload the asset if it's going to be used

{% if kbin_header_logo() %}
<img id="logo" src="{{ asset('mbin_logo.svg') }}" alt="{{ 'homepage'|trans }}" title="{{ 'homepage'|trans}}">

@e-five256 e-five256 added bug Something isn't working low priority does not impact production code labels Apr 8, 2024
@e-five256 e-five256 merged commit 5950947 into main Apr 8, 2024
7 checks passed
@e-five256 e-five256 deleted the e5/headerlogo-preload branch April 8, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low priority does not impact production code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants