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
LithiumsLithiums 

Image Issue

I was trying to refer an image from a zipped folder, which is uploaded into static resource and I get a error message.

 

Syntax from VF Docs:

<apex:image url="{!URLFOR($Resource.TestZip,
'images/Bluehills.jpg')}"
width="50" height="50"/>

 

I have tried the same thing but I dont see the image

 

<apex:image url="{!URLFOR($Resource.LSImages, '/checkbox-on.gif')}" width="50" height="50"/>, it woks fine when I refer the image induvidually and not from a zipped folder.

 

Best Answer chosen by Admin (Salesforce Developers) 
LithiumsLithiums

Looks like only the .gif images are getting displayed from the zipped folder

All Answers

@anilbathula@@anilbathula@

Hi lithiums,

 

I think ur using the image from static resources.

just try this code:-

<apex:image style="align:middle" url="{!URLFOR($Resource.ur static resource name)}" width="200" height="100" />

 

Thanks

Anil.B

LithiumsLithiums

Thats what I have, how is your code different?

LithiumsLithiums

Looks like only the .gif images are getting displayed from the zipped folder

This was selected as the best answer
@anilbathula@@anilbathula@

Hi,

 

just try this :-

<apex:image value="{!URLFOR($Resource.indicator)}"/>

here indicator is a gif file which i stored in static resource.

This is working for me in dev instance.

I hope this will help u.

 

Thanks

Anil.B

LithiumsLithiums

It works for me as well, when I refer the image directly. The issue was when I zip the folder and stoe multiple images.