Skip to main content
Solved

Auto-resize image preview in Universal

  • June 14, 2022
  • 1 reply
  • 118 views

Marius Korff
Captain
Forum|alt.badge.img+6

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

Best answer by Mark Jongeling

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! 😀

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

Mark Jongeling
Administrator
Forum|alt.badge.img+23

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! 😀


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings