Skip to main content
     This my code display image: 

 

<apex:image width="100p" height="100p" value="{!URLFOR($Resource.ProductImage, 'ProductImage/' & row.ImageName__c)}"></apex:image>

If i login to salesforce and run it display ok.

View html of control:

<img src="/resource/1528944622000/ProductImage/ProductImage/1.jpg" height="100p" width="100p">

If i not login to salesforce and run, it can't display image.

View html of control:

<img src="/demo1/resource/1528944622000/ProductImage/ProductImage/" height="100p" width="100p">

i had set Cache Control of  resource [ProductImage] is Public

Why can't display image on public site from Static Resouce?

                

              
6 件の回答
  1. 2018年6月15日 8:23
    Hi dai,

    if ImageName__c , Price__c can't display these both are image files issue with your code,

    check rightclick on output page and click on inspect check whether image space is rendering or not in UI level.

    If yes please check below link 

    https://developer.salesforce.com/forums/?id=906F0000000fz6CIAQ

    Mark as resloved if it helps :) :)

    Thanks, 

    Bhanu Prakash

    visit ForceLearn.com  (https://www.forcelearn.com)  ​ 
0/9000