+ Start a Discussion
Akshay PoddarAkshay Poddar 

How to Generate Preview Thumbnail of Attachments Records like PDF, JPEG or Excel in Visualforce ?

I would like to have below functionality created on Visualforce Page, Please help with the solution.

Attachment Preview

SandhyaSandhya (Salesforce Developers) 

Below is the sample code.
<apex:repeat value="{!Case.attachments}" var="att">
            <apex:panelgrid columns="1">
                <apex:image url="{!URLFOR($Action.Attachment.Download, att.id)}"/>

Refer below link

Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.

Best Regards,
Akshay PoddarAkshay Poddar

Thanks for your response @Sandhya

But i want thumbnail of files like small picture of files to be shown, i tried the above code and its not working for PDF and other non-image files.



Is there a lightning equivalent?