Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Grav Youtube Plugin: does lazy load functioning properly?

Solved by 01K View solution

Started by 01K 5 years ago · 3 replies · 553 views
5 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?

5 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.

5 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
5 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 Jerry Hunt, 4 days ago
2 85 13 hours ago
General · by pamtbaau, 18 hours ago
1 60 17 hours ago
General · by Andy Miller, 1 day ago
0 47 1 day ago
General · by Marcel, 12 months ago
6 350 5 days ago
General · by Duc , 6 days ago
3 44 5 days ago