You need to sign in to do that
Don't have an account?

Aura Component - display image from file
Hi all,
I need to display an image from a file to an aura component.
Can someone give me a piece of advice for the img source?
I tried
However, it does not work.
Thanks,
Angel
I need to display an image from a file to an aura component.
Can someone give me a piece of advice for the img source?
I tried
<img src="{!'/sfc/servlet.shepherd/version/download/0681w000000iOxfAAE'}" />
However, it does not work.
Thanks,
Angel
You can try adding your image in the static resource and refer to the static resource by using the following method:
for stylesheets: <ltng:require styles="{!$Resource.<your_resource_name> +
'/assets/styles/salesforce-lightning-design-system-ltng.css'}"/>
for image: <img src="{!$Resource.<your_resource_name> + '/assets/icons/action/user_60.png'}"></img>
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com