What is the quality of images uploaded from the editor?

I added an Image to a form, then I uploaded an image from the IDE and the quality of the image was low.

The file I uploaded was a png screenshot with some text and graphics and the size of 1096 x 759. The text was readable, but was ugly.

I uploaded the same file as an asset and I added this code:

def form_show(self, **event_args):
  self.image_1.source = '_/theme/image.png'

And the screenshot came up perfect.

I assume there is some undocumented size reduction or compression going on. Is it possible to know what’s going on here?

EDIT
Instead of using the form_show event I replaced the text in the source property with _/theme/image.png.

As a side note, when I selected the long text that represents the bitmap previously uploaded to the form and pressed delete, the IDE hung for about minute.

1 Like

Yep – we automatically resize those things down and JPEG encode them if the image is too big. I’ve raised a ticket to document back :slight_smile:

As a side note, when I selected the long text that represents the bitmap previously uploaded to the form and pressed delete, the IDE hung for about minute.

I’ve just investigated this, and can reproduce! I say this gingerly, but this appears to be a Chrome regression – it’s not hanging in our JS code, and still happens even if I remove all the event handlers from that text box. Auto-updating browsers mumble grumble…

Is it possible to show a warning when the uploaded image is compressed, so lazy users that don’t read the documentation are happy too?

1 Like

:roll_eyes: This is why I keep both Chrome and Firefox on hand…