# $image
This keyword can be used alone, together with the $file
or with the $link
keywords. This means that, at the instance level, whenever you add - either via direct upload or through a link to an external URL - a pdf file or an image stored in a .png, .gif, .jpeg/jpg, .tif/tiff, or webp file format to it, a thumbnail of the first page of the pdf or of the image will automatically be displayed in any instance listings.
# Installation:
cob-cli customize image
# Usage:
$image<([replace:false,width:number])>
Options:
Parameter | Description |
---|---|
replace | can be defined as true of false - with the default value being false . For instance, $image([replace:true]) means that, when displayed in the instance details page, the link to the file will not be included above the image |
width | accepts as a value a given number in pixels, for instance, 150: $image([width:150]) . This means that, when displayed in full - not as a thumbnail -, the image will have a wdith of 150 pixels |
TIP
When used without the width
argument, the default width of the image is going to be 250 pixels.
# Examples:
# 1. With fixed witdh
$image([width:300])
Whenever we click a thumbnail, that image will be automatically displayed in full size on the right side of the listings window. However, the image is displayed on the left side if the full size image on the right side would cover the clicked thumbnail:
Additionally, once you access the details of an instance with a field built with $image
, the associated image will also be displayed. If you click on top of the image, you will be able to zoom in on it:
# 2. With no link visible
$image([replace:true])