Announcement

  •  » Extensions
  •  » GDThumb and Gthumb+ Causing CLS Issues

#1 2022-10-12 14:12:54

Applepiee
Member
2014-07-11
41

GDThumb and Gthumb+ Causing CLS Issues

Hi,

I have noticed my website is getting a pretty bad score on CLS (layout shift). It seems like GDThumb and Gthumb+ is causing this issue. When the page it loading it will throw all images on screen, and after only half a second it will sort them correctly.

Is there a way to make the images only appear when Gthumb+ is ready sorting the images? That way Google wont complain.

Thanks in advance!

Offline

 

#2 2022-10-30 23:27:29

Serge D
Member
US
2014-07-15
383

Re: GDThumb and Gthumb+ Causing CLS Issues

Included in the upcoming 1.0.25 is this change to improve anti-flicker / CLS
/js/gdthumb.js

Code:

  init: function() {
    var mainlists = jQuery('ul.thumbnails');
    if(typeof mainlists !== 'undefined') {
      mainlists.hide();
    }
    if (GDThumb.do_merge) { GDThumb.merge(); }

    GDThumb.build();
    jQuery(window).bind('RVTS_loaded', GDThumb.build);
    if(typeof mainlists !== 'undefined') {
      mainlists.resize(GDThumb.process);
      mainlists.show();
    }
    jQuery("ul.thumbnails .thumbLegend.overlay").click( function() { window.location.href = $(this).parent().find('a').attr('href'); });
    jQuery("ul.thumbnails .thumbLegend.overlay-ex").click( function() { window.location.href = $(this).parent().find('a').attr('href'); });
  },

Offline

 

#3 2022-11-01 11:47:15

MiPi
Member
2022-10-23
6

Re: GDThumb and Gthumb+ Causing CLS Issues

This change in 1.0.25 is causing freeze of my gallery home page in Firefox (looks like deadlock in JS script). It seems to be ok in Chrome, Edge and Vivaldi.

Last edited by MiPi (2022-11-01 14:20:43)

Offline

 

#4 2022-11-02 06:51:58

Serge D
Member
US
2014-07-15
383

Re: GDThumb and Gthumb+ Causing CLS Issues

cannot reproduce
could you provide a link?

Offline

 

#5 2022-11-02 08:02:10

MiPi
Member
2022-10-23
6

Re: GDThumb and Gthumb+ Causing CLS Issues

Sure, I returned back 1.0.25 version, only let me know when I can return working version back, with this code it is unusable in Firefox: https://mpilar.cz/foto/

I tried Firefox 106.0.3. in safe mode without any extensions, tried switch off my other Piwigo extensions, but no change at all.

Last edited by MiPi (2022-11-02 08:02:43)

Offline

 

#6 2022-11-02 08:16:52

MiPi
Member
2022-10-23
6

Re: GDThumb and Gthumb+ Causing CLS Issues

Now reproduced also with Chrome, some never ending recurse ended in call stack size exceeded in JQuery from bootstrap_darkroom. It seems the problem occurs during getting width or height on the element and calling jQuery.css( elem, type, extra )

Last edited by MiPi (2022-11-02 08:41:42)

Offline

 

#7 2022-11-02 18:47:11

astrastudio
Member
2022-11-02
1

Re: GDThumb and Gthumb+ Causing CLS Issues

I have the same issue as mentioned by MiPi.
I deleted gdThumb 1.0.25 and re-installed 1.0.24. Now my gallery works again.
Updating to 1.0.25 will break the gallery again. I also use bootstrap_darkroom as theme.

Best regards, Sascha

Last edited by astrastudio (2022-11-03 11:57:21)

Offline

 

#8 2022-11-04 11:57:41

MiPi
Member
2022-10-23
6

Re: GDThumb and Gthumb+ Causing CLS Issues

I returned back file from version 1.0.24, I do not want to have inaccessible site for so long. In case you would need to debug it on my site, let me know when. But I think you should be able to reproduce it with bootstrap_darkroom, I do not have anything special on my site.

Offline

 

#9 2022-11-04 21:22:20

Kinsman
Member
2017-03-01
31

Re: GDThumb and Gthumb+ Causing CLS Issues

It prevents display of the homepage entirely for me, in both Edge and Chrome. I have reverted back to 1.24

If you want an example I am happy to reinstall 1.25 as it is easily reproducible. Also does not appear theme related as i tried several all with the same result.

Offline

 

#10 2022-11-05 04:47:17

Serge D
Member
US
2014-07-15
383

Re: GDThumb and Gthumb+ Causing CLS Issues

version 1.0.26
- Removed antiflicker logic as not working in some browsers

Offline

 
  •  » Extensions
  •  » GDThumb and Gthumb+ Causing CLS Issues

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact