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
Mahesh NirmalMahesh Nirmal 

Images are not loading on public site.

I am having a public site and I am showing the image from the static resource on the lightning component.

But the image is not loading.

User-added imageNote: I have inserted a zip file in static resource and used that zip in the lightning component.

<img src="{! $Resource.testName + '/assets/icons/utility/'+ severity + '_60.png'}"/>

Can anyone help me out with this. To have an image loaded on the public site.

PriyaPriya (Salesforce Developers) 
Hi Mahesh,
 

Check below example that matches your requirement :- 

https://salesforce.stackexchange.com/questions/235749/external-image-not-displaying-in-community#:~:text=3%20Answers&text=Try%20going%20to%20settings%20%3E%20search,your%20image%20then%20Good%20luck!
 

Please mark as Best Answer so that it can help others in the future.

Regards,

Priya Ranjan


 
Mahesh NirmalMahesh Nirmal
Hi found the solution for the above question.
You have to upload the image in the document and click the Externally Available Image to true click on the uploaded image and copy the image path and put it into the Img tag in the lightning component.