You need to sign in to do that
Don't have an account?
![Jason Benkert Jason Benkert](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Icons not displaying in Community
I have a Community built in Community Builder that uses lightning components and the Lightning Design System css & asset package. I am using one of the svg icons from the SLDS assets, and it's working fine in the sandbox (the published community in the sandbox is rendering the icon as expected).
However, now that the community is in Production, the published pages are not displaying the icon, and I'm getting a 404 error when the page tries to load the asset: "https://myclientsorg.force.com/resource/SLDS0122/assets/icons/custom-sprite/svg/symbols.svg " This is the path to the asset that's failing to load. However, I'm using the CSS from the same package, so it's just the svg symbols that aren't showing up.
Can anyone provide any insight??
However, now that the community is in Production, the published pages are not displaying the icon, and I'm getting a 404 error when the page tries to load the asset: "https://myclientsorg.force.com/resource/SLDS0122/assets/icons/custom-sprite/svg/symbols.svg " This is the path to the asset that's failing to load. However, I'm using the CSS from the same package, so it's just the svg symbols that aren't showing up.
Can anyone provide any insight??
Try adding community name in the URL mentioned in svg component.
For ex. /CommunityName/resource/SLDS/asset...
For getting UrlPathPrefix, you can use following query:
String urlpathprefix = [Select UrlPathPrefix from Network where Name ='Community_Name'].UrlPathPrefix;
system.debug(urlpathprefix);
Thanks,
Amit