25

I have a Visualforce page that includes some Ajax functionality as follows:

<apex:actionStatus id="searchtStatus" stopText="">
    <apex:facet name="start">
       Searching....<img src="{!URLFOR($Resource.res, 'img/loading.gif')}"/>
    </apex:facet> 
</apex:actionStatus>

<apex:commandButton 
      action="{!search}" 
      value="Search" 
      reRender="searchResults"    
      status="searchStatus"/>

Alternatively, I could have just linked directly to the Salesforce image in the facet as follows:

<apex:facet name="start">Searching....<img src="/img/loading.gif"/></apex:facet>

I did not do that because I could not find a list of Salesforce published standard images and, therefore, was not confident that the /img/loading.gif would always be present. I did see that there are some references in the IMAGE formula examples to images located in /img/samples/.

Is there a list of Salesforce images that can be referenced safely in custom pages and/or formula fields?

  • Salesforce recommends putting all the images or style classes even natively found in static resources since salesforce (Safe Harbour) does not guarantee that this might not change in future.And it has been observed from time to time that salesforce has changed this images and styles – Mohith Shrivastava Nov 3 '12 at 12:35
19

I would put using images that salesforce use to render stuff in the same broad bucket as screen scraping.

Whilst this may work okay, there isn't a way to warranty against breakage some day.

(I've used the sfcti js resource for CTI and the locations have changed twice in the last 12 months, there isn't a way to tell when they changed except for when users discovered CTI won't work anymore, therefore this approach surely has its perils)

Having said all this, a quick google search threw up this page which seems to catalogue quite a few images / icons.

http://www.force2b.net/index.php/2010/08/salesforce-icons/

10

You might also check out graphics pack from Salesforce labs on AppExchange. Lots of examples and icons: link

4
+100

Well, I was also referencing those links earlier and found that some of them no longer work and others don't have all the images.

You can still look at all the CSS files provided by Salesforce and refer images within them. I just did it and compiled it on my blog here: http://www.vermanshul.com/2017/10/quick-tips-salesforce-default-images.html

3

The official Salesforce help documentation has examples using the image formula function with images hosted on the Salesforce servers. I would expect that these images are reliably going to be there. There aren't many but they are great for status, ranking or health related images.

  • /img/samples/color_green.gif
  • /img/samples/color_yellow.gif
  • /img/samples/color_red.gif

.

  • /img/samples/light_green.gif
  • /img/samples/light_yellow.gif
  • /img/samples/light_red.gif

.

  • /img/samples/rating1.gif
  • /img/samples/rating2.gif
  • /img/samples/rating3.gif
  • /img/samples/rating4.gif
  • /img/samples/rating5.gif

.

  • /img/samples/stars_000.gif
  • /img/samples/stars_100.gif
  • /img/samples/stars_200.gif
  • /img/samples/stars_300.gif
  • /img/samples/stars_400.gif
  • /img/samples/stars_500.gif
2

There are lots of images included in the Salesforce Design System.

Also, this page might help with using Salesforce Design System with Visualforce:

0

Here's a very good one that has most of the Salesforce standard icons. You can right view source for the paths of the images.

http://free-121d5f44d20-121d603d1c5-121ee2b8103.force.com/force2b/salesforceicons

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.