Third party Artifact in Album thumbnail border

craigForo

Active member
Since upgrading I noticed artifact in the album thumbnail as seen here;

thumb.webp

I seen some had same issue on 2.1 platform, but didn't see a resolution posted.
 
Nothing particular. I'm not sure it's something that happens routinely for all customers so that likely points to differences in PHP or the underlying GD or Imagick library.

If you're able to let us know what image processor you have setup in Admin > Options > Attachments that will be something we can look at to see if we can reproduce it reliably.
 
If you're able to let us know what image processor you have setup in Admin > Options > Attachments that will be something we can look at to see if we can reproduce it reliably.

Default image processor - PHP built-in GD image library

Debian Linux 9
PHP Version 7.3.23-1+0~20201008.68+debian9~1.gbp30f6c3
GD library Version 2.2.5
 
I have the same problem:

After the update to XFMG 2.2.1 in the album browser it looks like this:

1606860186547.png

It was reported to me directly after the update from different forum users with different browsers. I have it with the latest Chromium Edge, latest Firefox and latest Safari on iPhone 11.

Reinstalling the Media Gallery, rebuilding the caches and thumbnails didn't solve it. The outdated templates are merged. Emptying browser cache and reload the site didn't change it.

The style is based on the default style with some little modifications in the extra.less, which shouldn't cause the problem. In the version 2.2.0 of the XFMG it was ok.

The PHP version is 7.4.13.
GD library version is 2.2.5.
 
Last edited:
In which template ore which php script are the album thumbnails generated? Maybe a workaround is possible, e.g. no border between the pictures.
 
We've had sporadic reports of this and it is generally fixed by changing the GD library version.

I have a strong feeling that GD library version 2.2.5 is responsible as it seems to come up in reports here before and elsewhere.

If you’re unable to change this you may want to consider changing the image processor in your attachment options to Imagick.

This won’t be susceptible to the same issues.

I’d certainly recommend going down that route but also keep an eye on this thread.

I am hoping to reproduce the issue and if I can I will look at workarounds but I have no guarantee for how long that will take or if it will be even possible.
 
I have a managed server and can't change the GD library which is used together with PHP 7.4. Imagick is not provided by my hoster and I don't have rights to install it. But I can switch to other PHP versions. Maybe in PHP 7.3 or 8.0 they provide a other version of GD library.
 
Yes that is possible. Some people have changed to different PHP versions to solve it in the past.
 
I switched to PHP 7.3.25 which is provided at my managed server. It use a other version of the GD library. After rebuilding the album thumbnails the borders are ok.

@Chris D It really seems to be a problem with the GD Library version 2.2.5.

Unfortunately php 8 on my server has the same version of the GD library as in 7.4.
 
I did find an associated issue reported on the GD library GitHub which may have a workaround but I don't know if it will be at the expense of quality.

Anyway, we'll certainly look into it and in the meantime hopefully using PHP 7.3 will be fine.
 
I switched to PHP 7.3.25 which is provided at my managed server. It use a other version of the GD library. After rebuilding the album thumbnails the borders are ok.

@Chris D It really seems to be a problem with the GD Library version 2.2.5.

Unfortunately php 8 on my server has the same version of the GD library as in 7.4.
This resolved my issue as well.
 
It's not just 2.2.5 but as best I can figure it's any version above 2.2.5 which means it affects version 2.3.0 too.

I think there is a similar report, although it certainly seems to be manifesting itself differently, over at the GD library GitHub, which I have added some examples to:


There is a workaround but in every case it produces a worse quality image, though that is probably preferable to the artifacts.
 
Is it possible to use a other background color, e.g. white with the function imagecopyresample? Maybe then there are no artefacts.
 
This is fixed by virtue of a new GD 2.3.3 release.

This was just fixed for GD 2.3.3 (released 09/12/2021)

Upgrading GD may depend on a number of factors including what's available in bundled PHP builds and distro packages. First speak to your host if you're unsure but as a general rule of thumb newer PHP versions will probably come pre-bundled with newer GD versions so hopefully the latest third point release in your PHP version will eventually come with the latest GD version.
 
Top Bottom