Skip to main content
I saw on a previous post that somone managed to retain image ratio by using 'Max Height' / 'Max Width'. Does anyone know how to do this?

 

...or have an other solution. (Especially one that will work with Lightening when we switch.)

 

We use the image formula field on all Product records, in list views and to view on iPhone Ap.

 

This is what my currently formula field looks like. It squashes all images into a square.

 

IF( ISBLANK( Thumbnail_Document_ID__c ) , '' , IMAGE("/servlet/servlet.FileDownload?file="+Thumbnail_Document_ID__c, "No Image",220,220))
11 个回答
  1. 2017年2月21日 08:32
    Hi,

     

    the solution is to give one value fix (width or height) and the other one negative -1)

     

    So for example:

     

    IF( ISBLANK( Thumbnail_Document_ID__c ) , '' , IMAGE("/servlet/servlet.FileDownload?file="+Thumbnail_Document_ID__c, "No Image",-1,220))
0/9000