Is it still best to use Static Resources to zip up images to use in a VisualForce page (or elsewhere)?

We basically display a table on the page with a small image (a company logo) in each row. Currently we have a folder with all the logos which we zip up and then upload as a Static Resource, and then reference the file by using the company name to find the image. This method requires that we get the name exactly the same/right and also to upload a new file every time we have to add an image. Also a problem if we change an account name (rare though).

I'm wondering if this is the best way, or would saving the images as files and saving a link to the file on the account be better?

Or any other suggestions?

1 Answer 1


There's limitations no matter which way you go with it. I'd probably recommend a Rich Text Area to store/display the image, as you can easily upload the images directly without a deployment, making changes very trivial. Of course, you'll use file storage if you do this, but if you're considering switching to files, this might be better, as file storage will be automatically freed if the field is cleared. While there is no one right answer, you might find that this solution would work well for many small images.

  • I'm trying to test this, but it's not displaying the image? I uploaded a small image (250x125) into new RT field logo__c and want it to show up in a table cell on the VF page. Is there some way to handle it if it's to display in a table row? <td>{!rec.logo__c}</td> displays nothing (where rec is the repeating row - all other values are displayed, just not the image in the RT field).
    – Irene
    Sep 16, 2020 at 2:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .