Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Grav Youtube Plugin: does lazy load functioning properly?

Solved by 01K View solution

Started by 01K 6 years ago · 3 replies · 739 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 jeremycherfas, 4 days ago
2 86 15 hours ago
General · by Old Man Umby, 2 days ago
1 60 2 days ago
General · by Sebastian, 4 days ago
1 81 4 days ago
General · by Andy Miller, 2 weeks ago
0 215 2 weeks ago
General · by ready-4-IT, 6 months ago
1 716 3 weeks ago