Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a .rar using winrar that contains images and upload as a static resource, but when i tried to access the images they are not displaying on my vf pages. I looked in "View Page Source" rendered HTML and clicked the rendered resource link and it displays in a blank page with black background with the following error,

The image "…; cannot be displayed because it contains errors.

After that, i created a zip file using winzip and do the same procedure as above and got it worked. Now my questions are,

  1. Is static resources recognize the files with only .zip?
  2. What are the other zip formats it will accept? (.rar, .jar, .ear, .tar, etc)

Any suggestions please.

share|improve this question
up vote 10 down vote accepted

The only accepted formats are .jar and .zip

You can package a collection of related files into a directory hierarchy and upload that hierarchy as a .zip or .jar archive.

share|improve this answer
Note that a JAR is actually a ZIP with a renamed extension. It's use is for Java, of course, but in all other aspects, it is formatted as a normal ZIP file. – sfdcfox May 15 '14 at 14:14

As far as I used .zip and without any issue. In salesforce documentations also they have mentioned that .zip and .jar will work but nothing mentioned about .rar

If you are using WinZip make sure you are using the latest version since salesforce has announced it may loss your data with older versions.

If you are using WinZip be sure to install the most recent version. Older versions of WinZip may cause a loss of data.

share|improve this answer
i have given upvote for your answer @highfive – Baskaran S May 16 '14 at 18:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.