Plat-Dev-201 practice question 1 of 30
Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning web component? Choose 3 answers
Full set: 204 questionsLightning Web Components use static resources for custom SVGs. First, upload the SVG as a static resource (B). In the component’s JavaScript, import it using the @salesforce/resourceUrl directive and expose it via a property (A). Finally, reference that imported variable in the HTML template—for example, —to render the image (C).
D. Content assets are for CMS and aren’t required for LWC static-resource usage.
E. The template refers directly to the imported variable; no additional property beyond that created in step A is needed, so it is redundant.
1. Lightning Web Components Dev Guide, “Use SVG Resources—Import a Static Resource,” Winter ’24 release, para. 1-3.
2. Lightning Web Components Dev Guide, “Static Resources in LWC,” Winter ’24, Example code block showing upload-import-reference workflow.
Keep practicing
Take the free Plat-Dev-201 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other Plat-Dev-201 practice questions
- Question 2Which two statements are true about using the @testSetup annotation in an Apex test class…
- Question 3Managers at Universal Containers want to ensure that only decommissioned containers are a…
- Question 4Universal Containers has a Visualforce page that displays a table of every Container__c b…
- Question 5A developer is alerted to an issue with a custom Apex trigger that is causing records to …
- Question 6Which two operations affect the number of times a trigger can fire? Choose 2 answers
- Question 7A team of developers is working on a source-driven project that allows them to work indep…
