New answers tagged


It's possible with this URL: <a href="{!relatedTo.Static_Resource_Name__c}">Download PDF</a>


You can create a visualforce component and put all the repetiting static resources in it. Then put this component at the end of any page (considering all static resources are JS) you want to refer. This will work because visualforce component DOM is fetched and included in the containing page.


While I never got such a message, your issue (based on the shared code) is most likely the fact you are trying to use the import identifier in your markup. You have to assign mygif to an instance variable in your component class and use this one in your template. You can also validate it via developer tools => inspecting the dom element for your image and ...


The css class I created had the path to the folder like this: /fonts/font.woff. The solution was to use the relative path with ./fonts/font.woff. After changing that the fonts loaded using loadStyle. Thanks!


Example of loading static resource fonts in LWC Static Resource Structure style.css @font-face { font-family: 'Gilroy'; src: url('fonts/Gilroy-Medium.eot'); src: url('fonts/Gilroy-Medium.eot?#iefix') format('embedded-opentype'), url('fonts/Gilroy-Medium.woff') format('woff'), url('fonts/Gilroy-Medium.ttf') format('truetype'); font-...

Top 50 recent answers are included