Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
JMM
Experienced
Topic Author
Posts: 183
Joined: 02 Aug 2021, 11:18

Unable to use animated GIFs for folder previews on new X3 site

30 Jun 2025, 23:01

Hello, Karl,

I'm having a heck of a time with one of my X3 galleries.  Unfortunately, it is a private gallery inside my home network, and therefore has no access from the Internet, so I can't give you a link to investigate this problem.  I will try my best to explain what is happening.

On a number of my X3 galleries (all X3.34.2), I have a couple of folders that have animated GIFs that I use for folder preview images.  For example, on my X3 test site, I have THIS folder that contains a subfolder that uses an animated GIF for the folder preview.  Not that I have many (maybe a dozen) that have those animated GIFs for their previews, but I have not had any problem over the years with all my other X3 sites up until now.

However, I have created a new X3 site (alos X3.34.2), but none of the animated GIFs are displayed for folder previews... all that I get is a spinning circle.  I am at a loss as to why this is happening.

Could it be that there is a setting that I might have enabled on my other X3 sites to allow those animated GIFs to be used as folder preview images, but that I have forgotten that I did that?  Those animated GIFs display perfectly on that new site when viewed inside their folders... it is only the folder preview that is not working, and has those spinning circles.

Any thoughts?

Thanks in advance & have a great day.

Regards,
John
Location: Burlington (Toronto-ish), Ontario, Canada
Self-hosted using Abyss Web Server (non-Apache):   AuroraWings.me   |   FusionWings.gallery   |   PanAurora-Studio.com   |
Externally-hosted using LiteSpeed/Apache Web Server:   GenealogyWings.com   |
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14269
Joined: 30 Sep 2006, 03:37

Re: Unable to use animated GIFs for folder previews on new X3 site

01 Jul 2025, 03:38

JMM wrote:For example, on my X3 test site, I have THIS folder that contains a subfolder that uses an animated GIF for the folder preview.
Error 403 ...
JMM wrote:However, I have created a new X3 site (alos X3.34.2), but none of the animated GIFs are displayed for folder previews... all that I get is a spinning circle.  I am at a loss as to why this is happening.


It's a bit unclear what you are doing without a link or any reference. When using GIFs, although you are selecting it to be the preview image for a dir, it doesn't mean the GIF itself won't get converted to a thumbnail, in which case it will no longer be a gif.

However, if you are getting "spinning circle", it sounds like an error somewhere. We would diagnose this by opening the browser developer tools, locating the response that tries to load, and open it in new browser window to diagnose the response.

JMM wrote:Could it be that there is a setting that I might have enabled on my other X3 sites to allow those animated GIFs to be used as folder preview images, but that I have forgotten that I did that?  Those animated GIFs display perfectly on that new site when viewed inside their folders... it is only the folder preview that is not working, and has those spinning circles.

There is no such option that I am aware of.

To me, it seems like you have an error somewhere if you have "spinning circle", but this wouldn't be related to any "setting".
 
User avatar
JMM
Experienced
Topic Author
Posts: 183
Joined: 02 Aug 2021, 11:18

Re: Unable to use animated GIFs for folder previews on new X3 site

01 Jul 2025, 19:03

mjau-mjau wrote: However, if you are getting "spinning circle", it sounds like an error somewhere. We would diagnose this by opening the browser developer tools, locating the response that tries to load, and open it in new browser window to diagnose the response.
I found the problem.

Firstly, as you suggested, I used my browser's developer tools, and noticed this error when selecting any animated GIF:

Image

I am using PHP 8.4.8, by the way.  So then, as an experiment, I started rolling that X3 site back to previous versions of PHP, checking X3 with each previous version of PHP to see if the animated GIFs finally worked as folder preview.  I tried 14 previous versions of PHP 8.x, and none of the animated GIFs displayed as folder preview in any of those 14 previous PHP versions either.  However, as soon as I set that X3 site to use PHP 7.4.0, miraculously every folder that was set to use an animated GIF as the preview worked perfectly!

As an added bonus, up until now, any X3 folder that had an animated GIF would display only the placeholder when viewing Galleries in Panel, such as like this:

Image
All of those animated GIFs displayed perfectly when viewing them in the actual galleries, just not when viewing the galleries in Panel.  However, when I set that X3 site to use PHP 7.4.0, the actual GIF finally displayed when viewing Galleries in Panel, like this:

Image

When I then reverted that X3 site from PHP 7.4.0 back to PHP 8.4.8, the animated GIFs still displayed perfectly as folder previews, and also the GIF displayed perfectly when viewing Galleries in Panel.

So as a work-around, whenever in the future new animated GIFs don't display as folder previews, I'll just lower those X3 sites' PHP versions temporarily down to PHP 7.4.0, and once they display correctly, revert the PHP back to whatever the latest version happens to be.  I can live with that  :slight_smile:.

Also, I did not mention this before, but similarly to animated GIFs not displaying for folder previews, neither did animated Webp files.  By reverting down to PHP 7.4.0 temporarily and then back up to PHP 8.4.8, all those animated Webp files now work perfectly as folder previews too  :slight_smile:, although those Webp files still show only as placeholders when viewing galleries in Panel, but I can live with that too as long as they display fine for folder previews.

Regards,
John
Location: Burlington (Toronto-ish), Ontario, Canada
Self-hosted using Abyss Web Server (non-Apache):   AuroraWings.me   |   FusionWings.gallery   |   PanAurora-Studio.com   |
Externally-hosted using LiteSpeed/Apache Web Server:   GenealogyWings.com   |
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14269
Joined: 30 Sep 2006, 03:37

Re: Unable to use animated GIFs for folder previews on new X3 site

02 Jul 2025, 04:12

Hmm interesting. It seems you might have found a bug, as imagegif() function may fail in newer PHP versions when too many generic arguments are given, while older PHP versions just ignored unused arguments. It just hasn't been detected, since GIF isn't really used by many in X3.

I found this errors on newer PHP versions:
Code
Fatal error: Uncaught ArgumentCountError: imagegif() expects at most 2 arguments, 3 given in /app/parsers/slir/index.php:489 Stack trace: #0 /app/parsers/slir/index.php(489): imagegif(Object(GdImage), NULL, NULL) #1 /app/parsers/slir/index.php(502): resizer->__construct() #2 {main} thrown in /app/parsers/slir/index.php on line 489
I will look into it for next release. Thanks for taking the time!
 
User avatar
JMM
Experienced
Topic Author
Posts: 183
Joined: 02 Aug 2021, 11:18

Re: Unable to use animated GIFs for folder previews on new X3 site

02 Jul 2025, 05:42

I had thought that quite possibly the problem was on my end, as in my php.ini files.  Glad that you were able to find the problem so fast.
mjau-mjau wrote: It just hasn't been detected, since GIF isn't really used by many in X3.
Yeah, I'm an oddball, using X3 the way that I do  :upside_down:.

Thanks again, and have a great day.
Location: Burlington (Toronto-ish), Ontario, Canada
Self-hosted using Abyss Web Server (non-Apache):   AuroraWings.me   |   FusionWings.gallery   |   PanAurora-Studio.com   |
Externally-hosted using LiteSpeed/Apache Web Server:   GenealogyWings.com   |