Activity Forums Salesforce® Discussions How to add background image to Salesforce Lightning component in Community?

  • Kumar

    Member
    January 25, 2017 at 12:42 pm

    Hi Tanu,

    If you upload you image to a static resource. Yes.

    All you need to do is go under the "Branding editor" -> Edit custom CSS and add the appropriate styling. Reference your image accordingly, for example:

    body
    {

    background-image: url('https://salesforceDomain/resource/"generatedID"/StaticResourceFile/img.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    }

    VF page:

    <apex:image url="{!URLFOR($Resource.FolderName,
    'filepath/ImgName.jpg')}" />

    Hope this helps.

    • This reply was modified 7 years, 10 months ago by  Kumar.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos