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 "view-source:c.na15.visual.force.com/resource/1400088230000/UtilityImages/…; 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.


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.


  • 2
    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.

  • i have given upvote for your answer @highfive
    – Bforce
    May 16 '14 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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