Skip to main content
The thumbnail field in Product Object is currently stretching an image to fit into a square container (220x220).

 

We require the thumbnail to display the image in the ratio of the original file. In the examples below the first is the stretched image on Product object and the second is the unstretched image.

 

Images are uploaded into the Document object and the document ID is saved onto the product record.

 

Can anyone advise on how to get around this problem?

 

Many thanks. Heidi

 

Thumbnail field on Product object stretches image to fit a square size regardless of shape.

 

True image aspect ratio
7 risposte
  1. 20 ott 2015, 15:54
    Ah! That is it. You have specified the height and width

    as 100 X 100 pixels. Try this - 

    IF(

    ISBLANK(Thumbnail_Document_ID__c),

    NULL,

    IMAGE("/servlet/servlet.FileDownload?file=" + Thumbnail_Document_ID__c, "Thumbnail")

    )

0/9000