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

Image tag

I'm trying to use a zip resourse in image tags. 


The name of the zip file is The unzipped folder is called slideshow and it contains a folder called images. Inside the images folder there is an image called 1.jpg.


The directory in my system looks like this :  slideshow/images/1.jpg


In the zip it is like this :>>images>>1.jpg


Now I'm using an image tag like this : 


<apex:image  url="{!URLFOR($Resource.slideshow, 'images/1.jpg')}"  width="600" height="400"/>



This tag shows a broken image in the page. Please help me to fix this. Thanks

The resource is a public one
Atul GuptaAtul Gupta

I tried this and it worked perfectly for me.


<apex:image url="{!URLFOR($Resource.slideshow,'images/1.jpg')}" />


Please make sure that the "slideshow" in the above tag is the name of the Static resource and not the zip file you uploaded.


Let me know if it worked for you or not.

yes. 'slideshow' is the name of the resource. If it were a wrong name, then it would throw this error:

"Error: Static Resource named slideshow does not exist. Check spelling"

I didn't get this message. It is displaying a broken image. :(
Atul GuptaAtul Gupta
Arun, in that case I've to look through your org itself.

Send me a mail, lets connect by TeamViewer

My Email :