Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Grav Youtube Plugin: does lazy load functioning properly?

Solved by 01K View solution

Started by 01K 6 years ago · 3 replies · 918 views
6 years ago

The Grav Youtube Plugin has a lazy-load function. It should increase performance of website.

After enabling lazy-load function the pageSpeed Insights test still warns me about:
Remove unused JavaScript :
en_US/base.js(www.youtube.com)
www-embed-player.vflset/www-embed-player.js(www.youtube.com)

and

Remove unused CSS
www-player.css(www.youtube.com)

Is it normal behavior or lazy-load is not functioning properly in my case?
Placed it as shortcode in Custom HTML particle in Gantry 5 framework, Process shortcodes is turned on.
Could someone confirm?

6 years ago

Did you set the option in the Admin dashboard, or manually? Because the option in the config file is lazy_load with an underscore.

6 years ago

I've set it in Admin dashboard.
The config file now looks:

YAML
enabled: true
built_in_css: true
built_in_js: true
add_editor_button: false
player_parameters:
  autoplay: 0
  cc_load_policy: 0
  color: red
  controls: 1
  disablekb: 0
  enablejsapi: 0
  fs: 1
  hl: null
  iv_load_policy: 3
  loop: 0
  modestbranding: 1
  origin: null
  playsinline: 0
  rel: 0
  showinfo: 1
  vq: hd1080
privacy_enhanced_mode: true
lazy_load: true
6 years ago Solution

After some more tests I discovered that plugin partly works in Gantry Custom HTML particle with Short Code procession turned on. While it fully works in pages.
If there is no a hidden options it could be a bug in Gantry

P.S. I've reported this on Git, but it probably will take forever to investigate

last edited 01/30/21 by 01K

Suggested topics

Topic Participants Replies Views Activity
General · by Hanns Mattes, 6 days ago
0 93 6 days ago
General · by Dima, 2 weeks ago
1 121 2 weeks ago
General · by pamtbaau, 2 weeks ago
0 192 2 weeks ago
General · by lynbor, 2 months ago
5 701 4 weeks ago
General · by Andy Miller, 1 month ago
0 425 1 month ago