function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
parag bhingre 4parag bhingre 4 

How to handle 404 error when image is not present in static resource

hello,
i am writing below code.
<apex:column headerValue="Product Picture">
         <apex:variable var="imageVar" value="{!abc.xyz.item__r.Url_Name__c}.jpg"/>
                 <apex:image url="{!URLFOR($Resource.KLM, imageVar)}" width="80" height="80"/>
   </apex:column>



here i am displaying image coming from static resource. But if image is not present in static resource then i want to display default image.. How to do it? i am newbie in SF.
Akshit HuriaAkshit Huria
use alt attribute in apex:image tage to dispaly alternate text or image....alse refer componet refrence link..
if your problem get solved than mark this query as solved so other can also refer it..