In my Lightning Component, I have the following SVG file for a logo to be shown on the community builder page (when you install a Lightning Component).

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
   viewBox="-237 360.9 120 120" style="enable-background:new -237 360.9 120 120;" xml:space="preserve" width="120px" height="120px">
<style type="text/css">
<g id="Welcome">
  <g id="favicon">
    <g id="logo" transform="translate(0.000000, 1.000000)">
      <path id="Fill-6" class="st0" d="M-177.5,435.6c-5.6,0-10.1-4.5-10.1-10.1c0-5.6,4.5-10.1,10.1-10.1c5.6,0,10.1,4.5,10.1,10.1
        C-167.4,431.1-171.9,435.6-177.5,435.6L-177.5,435.6z M-177.6,410.5c-8.2,0-14.9,6.7-14.9,14.9c0,8.2,6.7,14.9,14.9,14.9

I need to use ltng:require instead because this is the right way to load external css and not use tags as mentioned in here. However, whenever I apply the ltng:require tag, an error occurs saying that ltng:require is an invalid SVG tag.

Is this because ltng:require is only available within aura:component tag? If so, what would be a workaround?


As you have already figured it out ltng:require is only for .cmp files and its absolutely ok to load the external CSS as it is in your .SVG file .The .SVG file that you have looks ok .

  • Thanks, Mohith. I had to ask because Security Review failed and gave us this comment on all our SVG files. – kev_panda Dec 20 '16 at 17:15
  • Please schedule an office hour to discuss the issue with them – Mohith Shrivastava Dec 20 '16 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.