Skip to main content

Hi,

I was wondering how to (auto)scale/resize an image shown in the preview component in Universal. As you can see below, the image is shown at its original size with scroll bars in Universal. The Windows GUI does automatically scale/resize images.

Universal GUI
Windows GUI

I tried using an expression with the HTML domain:

concat('<img src="',
t1.product_image,
'"style="width:100px;" alt="image"/>')

Which results in:

<img src="https://vastgoedpartner.nl/wp-content/uploads/2018/12/IMG_3845-4.png"style="width:100px;" alt="image"/>

Unfortunately, the preview component does not seem to pick up this HTML calculated field and it keeps showing the image url (website domain). I've also tried the following variation that includes the html & head tags, but this did not change anything.

concat('<html><head></head><body>',
'<img src="',
t1.product_image,
'"style="width:100px;" alt="image"/>',
'</body></html>')

 

So if anybody knows how to get the same automatically resized image in the Universal GUI as in the Windows GUI, I'd like to know :)

 

Running Universal GUI 2022.1.16 b1.0

Hi Marius.

During the inspection of this question, we've found an issue in the Universal GUI that results in the behavior you have explained. We have created a ticket for it to be resolved.

The auto-resize does normally work:

Examples

It seems to be in combination with images loaded from the internet. We'll resolve it! 😀