Hello!
I have a problem with favicon in Vaadin 24.3.13. I put the icon in “src/main/resources/META-INF/myfavicon.ico” (Is the right path?) and I have this code in my class:
The path you have is correct, but the icon name needs to be favicon.ico. If you name it that, it will be picked up automatically, no need for the configurePage override.
Hello Marcus.
Sorry, but it doesn’t work for me.
I have Vaadin updated to 24.3.13
Favicon is on path src/main/resources/META-INF/favicon.ico
Favicon is 32x32 ICO file with 32 bit color depth
I haven’t made any changes in configurePage
I have re-packaged app in production mode, cleared browser cache, tried Opera and Firefox, but still no custom favicon.
The answer to this questions always depends a bit on your application. If you have WAR packaged Spring Boot app, the default place of faicon.ico is here:
/src/main/resources/META-INF/resources works for me. If I put the icon in /src/main/resources/META-INF/resources/myfavicon.ico and add the following code to the AppShellConfigurator implementor, it is correctly rendered
Did you try to access the icon directly from the browser (e.g. http://localhost:8080/myfavicon.ico) to check if it is reachable?
Could it be some cache issue on the browser?
Solved using AppShellConfigurator.
Similar to Marco’s solution, but icon is in different directory and different type.
Application is packaged as fat-jar, did’n tried war files.
I used SVG file placed in static resource directory :
src/main/resources/static/Tangram_logo.svg
Then I applied AppShellConfigurator to my SpringBoot starting class: