The icon itself is 1687 x 1246 pixels, but I am not sure if this is supposed to be the issue as, from what I understand, .svg files are supposed to scale with the container they are in.
Hi Lucas, do you see any errors in the Network tab? What URL does it try to reach? Have you tried with /apps/[app-name]/assets/images/[folder]/[name]_icon.svg (no url(...)) or with full absolute URL? If you access /apps/[app-name]/assets/images/[folder]/[name]_icon.svg directly, does it display the icon?
if you perform a build of your application, can you check if the assets folder is included in the build? You can find the output of the build in the dist/<app-name>/ folder. Please confirm that the assets folder and the /assets/images/[folder]/[name]_icon.svg file are present there.
In case they are missing, you might need to adjust your Webpack copy plugin configuration. For support with that we would need to know the full folder structure of your project.
If you deploy that build the, is the deployed application showing up with the expected icon or are you still seeing the 404 response for the icon request?
This is weird. I re-deployed the application and I have not gotten a 404 error request. In fact, I don’t see a request for the icon, only one for the logo. The icon continues to be missing from my application and the App Switcher though.
If you right click the app icon in the app switcher and choose inspect, can you check the styles that are applied to the icon?
It should look like this:
I have cleared the branding.less file of any customizations that deal with <c8y-app-icon>. I can now clearly see the path to the icon in my app/assets folder. However the icon is still not displaying.
As said within the last message the icon url should start with: url(/apps/, you are still missing the / in front of apps.
After you’ve adjusted that part, can you check again, if you are now seeing a network request for that icon?
Can you maybe just rename the icon to something simple like app-icon.svg and place it in the assets/images folder, so we can avoid the whole blurring of the name and ensure that there are no typos? For that purpose also change the contextPath of the application to something simple like test.
The icon url should then look like this: url(/apps/test/assets/images/app-icon.svg).
Please remove the dist folder in case it is present, build your app and ensure that the dist/test/assets/images/app-icon.svg file is present after the build.
If that is the case, please deploy the app to your tenant and verify that the icon is found when accessing https://<domain-of-your-tenant>/apps/test/assets/images/app-icon.svg.
If this is also working, open the app: https://<domain-of-your-tenant>/apps/test/index.html and check if the icon is also shown in the app switcher.
The subfolder should not be an issue, you probably missed something else.
You can try just using your previous subfolder and it should still work. My guess would be some typo, special character or whitespace that is causing this.
Right. I have an additional question: I tried the same techniques with another iconand I got it to appear in the header bar, but when I deployed it to my tenant the icon did not appear on the App Switcher even though the url was listed correctly within the containing <i>.
The file is an .svg but with dimensions of 300x102 that fits oddly within the .c8y-app-icon container, so I am wondering if the dimensions has something to do with not displaying the icon.
Please check in the network tab if there was any attempt to load the icon and if it was loaded from the correct location.
In general the dimensions should not cause the icon to not be displayed. Depending on your icon it could be that it is displayed in a weird way so that you are actually not able to see it.