Skip to main content

How can I show an image in grid based on a public URL? I have a field with a varchar domain and UI control ‘Image link’. When configuring the storage location as storage type ‘AWS S3’ we get exactly what we want, however we want it to work using a public URL instead of an S3 bucket. We have tried ‘File system’ and setting the base path in the ‘path’ definition of the File System configuration. This does not show the image - see screenshot below. Unfortunately the indicium logs do not show anything related to fetching/showing the image/thumbnail. The developer tools show two requests related to the thumbnail. One does a count (no clue why) and the other seems to do something with filtering and returns the extracted file name from the URL and shows the indicator IsInvalid = TRUE probably meaning the file, url or request is invalid:

URL:
http://server_name/indicium/sf/1111/work_order_view.trade_work_order_kind_normal?useControlBasedFiltering=true&$filter=((subsidiary_id%20eq%201186)%20and%20(branch_id%20eq%22222)%20and%20(work_order_id%20eq%20141710))&$select=vehicle_thumbnail_url&$eager=vehicle_thumbnail_url 

RESPONSE BODY:
{
    "@odata.context": "http://server_name/indicium/sf/1111/$metadata#work_order_view.trade_work_order_kind_normal",
    "value": "
        {
            "vehicle_thumbnail_url": {
                "IsInvalid": true,
                "FileName": "291538_J0JVMppP03pw8r4KOpUnHR3ylrU9sMMBgJ.jpg"
            }
        }
    ]
}

We are wondering if it is possible to show an image based on an URL, and if so; how we can configure this properly.

We are using the Universal GUI version 2025.2.11.2.0
and Indicium version: 2025.1
 

 

Hi Benjamin,

If I understand correctly you want to show an image based on a link like so

https://www.website.com/image.png

That data would be stored in a varchar column image_url which is a simple text control.

Id then hide that column, and show a calculated field with an HTML control. 

That control would have the content calculated like so:

CONCAT(

    '<img src="',

    t1.image_url,

    '"  height="50">'

) AS image_preview

Note that I’ve specified the height hardcoded, this would be related to the height of your grid rows.

You could show the HTML field in the grid, and the text field in the form. You could also change which field the user sees in the form depending on whether they are edit mode or not.

Would this solve your issue?

Kind regards,

Tim de Lang


Reply