keepassium / KeePassium

KeePass-compatible password manager for iOS
https://keepassium.com
Other
1.21k stars 103 forks source link

Favicons in SVG format are not downloaded #319

Closed vit9696 closed 1 year ago

vit9696 commented 1 year ago

Description Websites with SVG favicons fail to download their icons.

How to reproduce Steps to reproduce the behavior:

  1. Create an entry for some website with SVG favicons (e.g. vseinstrumenti.ru)
  2. Try to download the icon.

Expected behavior Expect a favicon to be downloaded (i.e. vseinstrumenti.ru/favicon.svg).

Environment:

keepassium commented 1 year ago

KeePassium uses the standard UIImage class which natively supports the most common formats like PNG and JPEG. Apparently, it does not support external SVGs. Possible workarounds involve heavy frameworks like WebKit or SVGKit, which are just not worth adding for such an edge case.

So while I can reproduce the bug, I'm afraid it won't be fixed until Apple updates UIImage.

vit9696 commented 1 year ago

SVG itself does not have size and thus needs to be rendered before it can be displayed, so I am afraid UIImage will unlikely support it natively. Such images need to be converted to pixels first, i.e. png or bmp. I understand that using other frameworks might be complicated, but perhaps the issue should stay open till an easier to use API is found.

keepassium commented 1 year ago

This is too niche a case of an already niche feature. I believe that most sites adopting an SVG favicon will have the common courtesy of a raster fallback — be it for legacy devices or, ahem, for latest Safari. Exceptions such as the one you linked will need to be converted and imported by the user manually.

By closing the issue I just want to be transparent this won't be worked on. It is unsustainable to keep issues opened indefinitely "just in case". (Admittedly, there are a few counter-examples to this statement in this very tracker, but I am doing my best to trim them occasionally.)