WordPress uses a cache for storing the embed markup after first retrieving it via oEmbed and transforming it to the lazy-load version afterwards. When Lazy Load for Videos is active, the transformed markup is stored in the cache instead of the original iframe.
However, the original oEmbed markup (iframe) is cached instead of the lazy-load version when the following conditions are met:
the oEmbed cache for a post is empty or expired and
the AMP or feed view of that post is requested first (before a regular post view).
If that happens, all Youtube/Vimeo videos aren't embedded with the lazy load markup but with the original oEmbed markup – at least until the oEmbed cache expires.
KW_LLV_Admin::lazyload_replace_video() checks for AMP/feed view and returns the oEmbed code markup unchanged. source. WordPress uses the result of that method as embed markup and caches it in the postmeta table.
My first idea was to use separate oEmbed cache entries (one for default view, one for feed view, one for AMP) but it seems that that isn't possible with the WordPress oEmbed logic.
WordPress uses a cache for storing the embed markup after first retrieving it via oEmbed and transforming it to the lazy-load version afterwards. When Lazy Load for Videos is active, the transformed markup is stored in the cache instead of the original iframe.
However, the original oEmbed markup (iframe) is cached instead of the lazy-load version when the following conditions are met:
If that happens, all Youtube/Vimeo videos aren't embedded with the lazy load markup but with the original oEmbed markup – at least until the oEmbed cache expires.
KW_LLV_Admin::lazyload_replace_video()
checks for AMP/feed view and returns the oEmbed code markup unchanged. source. WordPress uses the result of that method as embed markup and caches it in the postmeta table.My first idea was to use separate oEmbed cache entries (one for default view, one for feed view, one for AMP) but it seems that that isn't possible with the WordPress oEmbed logic.
This issue is partly related to #54.