Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lazyload_images always disabled #1665

Closed
dpeca opened this issue Oct 20, 2019 · 2 comments

Comments

@dpeca
Copy link

@dpeca dpeca commented Oct 20, 2019

Even I have in conf only lazyload_images enabled:

pagespeed RewriteLevel PassThrough;
pagespeed EnableFilters lazyload_images,debug;

I end up with this:

mod_pagespeed on
Filters:
db	Debug
hw	Flushes html
ll	Lazyload Images

Options:
AvoidRenamingIntrospectiveJavascript (aris) True
EnableRewriting (e) 1
FileCacheInodeLimit (afcl) 500000
RewriteLevel (l) Pass Through
Statistics (ase) True
StatisticsLogging (asle) True

#NumFlushes            0
#EndDocument after     3266us
#Total Parse duration  2624us
#Total Render duration 1432us
#Total Idle duration   642us
No critical images detected.
The following filters were disabled for this request:
	Lazyload Images

I'm using latest nginx-pagespeed, compiled before 5 days, on Debian10.

My theory is that lazyload_images is somewhere disabled, in some conf file that I can't find.
I compiled it with --conf-path=/etc/nginx/nginx.conf option, so basically i'm using default Debian10 nginx conf file (instead of /usr/local/nginx/conf), buf however, even in /usr/local/nginx/conf I can't find any conf file related to pagespeed (is that okay or I should have some pagespeed.conf file?).

What i'm doing wrong?

Maybe lazyload_images requires some additional option in conf file, to be enabled?

@Lofesa

This comment has been minimized.

Copy link

@Lofesa Lofesa commented Oct 21, 2019

Hi @dpeca
As far as I can see, the filter is enabled cause it is listed in the debug messages.
Lazy_load (and others filters) need a bunch of hits to work. This filter need hits to calculate what images are above the fold in what screen sizes so need to have some beacons to see the images that are visibles, what images are in the next visible area and load these images and delay the rest.
Until the filter had enougth information to do this work, the filter is disabled.
Some filters need beaconing enable, by default is enabled, but try to expressly enable it.
The lazy load filter loads all images when the onload event is fired, to disable it try this

And try to set the auth domain:

pagespeed Domain http*://*.example.com;

@dpeca

This comment has been minimized.

Copy link
Author

@dpeca dpeca commented Oct 21, 2019

Thank you @Lofesa
That info (that filter will be disabled until it gain enough informations) I couldn't find on official page of lazyload_images filter - https://www.modpagespeed.com/doc/filter-lazyload-images

@dpeca dpeca closed this Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.