function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sathiya Subbaraj 6Sathiya Subbaraj 6 

How to use our own custom icons in lightning component?

RituSharmaRituSharma
Refer this URL ->https://developer.salesforce.com/forums/?id=9062I000000XtmsQAC
Sathiya Subbaraj 6Sathiya Subbaraj 6
Thanks for your quick response. Just to be more specific, I would like to use my own customicon in <lightning:buttonicon>. Any idea? Thanks
RituSharmaRituSharma
Only utility icons can be used with <lightning:buttonicon>. Alternatively, you can use any other SF provided icon using below mentioned way:
<button name="lead" class="slds-button">
    <span data-value="{!value}" onclick="{!c.controllerFunction}">
        <lightning:icon iconName="standard:lead" size="small"/>
    </span>
</button>

Now in above logic, if you replace the highlighted line with <img> tag as mentioned in the previously shared URL, you would be able to user your own icon.
AbhishekAbhishek (Salesforce Developers) 
Yes it is possible.

https://developer.salesforce.com/docs/component-library/bundle/lightning:buttonIcon/documentation

Try the example as mentioned in it.
John KlokJohn Klok
Hi

You can use like this.

<aura:application extends="force:slds">
        <lightning:icon iconName="custom:custom20" />
</aura:application>

Aslo refer this link for more information

https://developer.salesforce.com/docs/component-library/bundle/lightning:icon/documentation

Kindly mark this as solved if the reply was helpful.

Thanks.