Resizing Images in Editor will result in bad quality since 18.X

Hello,

today I finally upgraded our XWiki Server from 17.10.2 to 18.3.0 (at same time Debian 12 to 13…)
What immediately sprung to my attention: When resizing images like a screenshot the image quality is quite bad now. :frowning:

This is despite already having:
#ENV replaces ‘xwiki.plugin.image.defaultQuality’ in /etc/xwiki/xwiki.cfg

Environment=“XCONF_xwikicfg_xwiki_plugin_image_defaultQuality=1.0”

First I suspected that maybe the xwiki.plugin.image.defaultQuality property not being processed as Environment Variable mapping so I configured it in xwiki.cfg like the old fashioned way - still no change.

But this also seems way worse than what I remember the default (0.5) was - as far as I remember that only was visible on natural photos - not screenshots.

It is very easily observable with screenshots and the quality changes always happens once you hit save. Editing again will continue to show the same bad quality.

Steps to reproduce:

  1. Make a Screenshot of something simple like text and GUI elements
  2. Paste it via Ctrl+V into the WYSIWYG Editor (looks good)
  3. Resize it smaller in editor (still looks good)
  4. Press save/finish - Quality Drops SIGNIFICANTLY immediately.
  5. Edit again, same bad quality
  6. Resize larger - quality really bad but larger now
  7. Save/finish - quality better again

Is xwiki.plugin.image.defaultQuality deprecated and replaced and I just need to configure another property? Did XWiki received a new Image engine in 18.X? Can you guys reproduce the issue?

Example Screenshots

Original Screenshot:

Simply pasted into editor looks good:

resized a lot down bit but still in edit mode, very good quality:

Saved/finished in view mode, it gets a LOT more blurry:

At least how I remember this was not the case with 17.X :sweat_smile:

Oh also the translation of the Image Edit Dialoge got broken with some version inbetween 17.10.2 to 18.3 - before it was 100% translated to German, now it falls back to 75% to English.^^

Thank you for your efforts and best regards

Tom

Here’s a side-by-side comparison between 18.3.0 (left) and 17.10.2 (right). There’s no significant difference AFAICS:

It looks bad on both sides, so I don’t think there is a regression. Maybe you had this in xwiki.properties:

rendering.imageDimensionsIncludedInImageURL = false

and you lost it on upgrade. See https://extensions.xwiki.org/xwiki/bin/view/Extension/XWiki%20Platform%20-%20Image%20-%20Processing%20-%20Plugin/ .

1 Like

Hi, Sorry didn’t response earlier. Yes this fixes it, thank you very much! Eventhough I don’t remember ever setting the rendering.imageDimensionsIncludedInImageURL ever before, but idk.

Just makes me wonder - the very strong comprerssion and low quality (both settings) are probably defaults from many years ago when bandwiths and data plans were quite low, processing power and RAM on Servers and devices were low too.

Wouldn’t it maybe be good to change these values to new higher quality defaults as todays bandwiths, data allowance and processing power of devices and servers are much better now?

1 Like

On the other hand, I think the size of image files (especially photos) has increased as well. But I agree we should reconsider the default behavior. I started as discussion at Do we still want server-side image resize by default? .

Thanks,
Marius