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

Fix UserSVG handling extensionless images as SVGs #226

Merged
merged 1 commit into from
May 21, 2023

Conversation

AmoebeLabs
Copy link
Owner

@AmoebeLabs AmoebeLabs commented May 21, 2023

Description

Version 2.4.4 inadvertently treated extensionless images as SVGs, and tried to inject them, which failed of course.

This has been fixed:

  • any image with a different or no extension will be handled by the default image render path
  • only SVGs are injected (if svginjection set to true, which is the default)
  • if injection fails, a fallback is added: the svginjection option is set to false, and a new render is initiated, which means the image is rendered as an external SVG image (or whatever it is).

Related Issue

Motivation and Context

How Has This Been Tested?

Tested with the person card:

  • Person: icon
  • Tha Washer: external image from /local/images
  • Ricky: from the HA Person object, /api/..../512x512

Screenshots (if appropriate):

image

@AmoebeLabs AmoebeLabs linked an issue May 21, 2023 that may be closed by this pull request
@AmoebeLabs AmoebeLabs merged commit d7a802a into master May 21, 2023
@AmoebeLabs AmoebeLabs deleted the 224-245-somehow-added-hidden-class-to-usersvg branch May 21, 2023 19:20
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.4.5 somehow added .hidden class to usersvg.
1 participant