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

Use custom icon for PWA / mobile home screen tile icon #669

Closed
dimatx opened this issue Jan 30, 2023 · 6 comments
Closed

Use custom icon for PWA / mobile home screen tile icon #669

dimatx opened this issue Jan 30, 2023 · 6 comments
Labels
✨ Feature A feature you'd like to be added

Comments

@dimatx
Copy link

dimatx commented Jan 30, 2023

Description

Using v0.11.3 and finding that although I have changed my icon in Homarr, the one that is being used for PWA/home screen tile is the default Homarr icon.

Renders fine in browser favicon:

Windows
image

Android
image

but still places Homarr icon when PWA is created:

Microsoft Edge on Windows
Step 1
image
Step 2
image

Google Chrome on Android
image

Priority

Low (Nice-to-have)

@dimatx dimatx added the ✨ Feature A feature you'd like to be added label Jan 30, 2023
@ajnart
Copy link
Owner

ajnart commented Jan 31, 2023

I don't think this is possible, the PWA is created at build time and cannot read the user settings. You could always replace the default homarr logo with a bind mount in docker

@dimatx
Copy link
Author

dimatx commented Jan 31, 2023

This works well with another dashboard I use, Homer. I believe it's an implementation that makes this work / not work.

@manuel-rw
Copy link
Collaborator

Hi, thanks for the issue.
I think we might be able to make this work.
Currently, we use this file for the PWA: https://github.com/ajnart/homarr/blob/dev/public/site.webmanifest

I think we have two options:

  • Instead of using the pre-generated maskable images, we'll just use a default path (eg. /imgs/pwa or /imgs/logo/logo.png)
  • Generate the manifest file using the NextJS response API. We should be able to create one dynamically from the request. If there is a cookie for the config, we'll just return the icons from that config. If not, we'll just return the default Homarr icon.

I am not sure though how this will affect PWA Apps (eg. Safari, Chrome, ...). Perhaps they do caching and it will take some time to update?

@dimatx
Copy link
Author

dimatx commented Jan 31, 2023

Thank you! Good question about the PWA... Yes, I do believe you're right that there's some form of caching, and from my experience that cache is quite long. I would think that most users don't change their icon very often, and it would be acceptable to re-create the PWA on mobile/desktop after an icon change. So from my perspective, as long as the 'right' icon is provided at the creation of the PWA, this would satisfy my use case.

This may be a useful reference for favicon/pwa icon stuff -- https://realfavicongenerator.net/ -- , as it seems like it is (or used to be) somewhat inconsistent across platforms/browsers.

@markesss
Copy link

markesss commented Jan 2, 2024

Another approach that could be taken would be to set the manifest file on a per board basis, and store the manifest's url in the board configuration and fallback to the default manifest public/site.webmanifest when not set.

I've just been having a bit a of a play with this approach here -> https://github.com/markesss/homarr/tree/pwa-mobile-669.

Though, the favicon field would still need to be set for the iOS App (via shortcut link, or apple-touch-icon), testing with my iOS devices confirmed this as well

@Meierschlumpf
Copy link
Collaborator

Can you test if this is still an issue with 1.0 and open a new issue there if so?

@Meierschlumpf Meierschlumpf closed this as not planned Won't fix, can't repro, duplicate, stale Mar 2, 2025
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Homarr Kanban Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature A feature you'd like to be added
Projects
Status: ✅ Done
Development

No branches or pull requests

5 participants