YouTube embed scaling issue

Posted in: Newspaper
Post count: 45

Hi, since updating to the latest version of Newspaper we have some issues with embed scaling.

When loading a page that contains YouTube videos (example) there are scaling issues.

If I refresh the page while in front of the video, the video scales correctly, but if loading the page when not “looking” at the video, the embedded element is small.

Notes:
– We use LiteSpeed Cache
– LazyLoading for iframe is disabled
– I’ve tried disabling the cache plugin, but the problem is still there

Post count: 35449

Hi,
Please try to exclude the embedded video iframe from cache , this should resolve the problem.
Thank you!

Post count: 45

Unfortunately I am still struggling. As I said, I have also tried disabling the Litespeed Cache plugin entirely.

Here you can see that the container correctly goes full-width but the embed element doesn’t. I can see that the video has the lazyloaded class applied, I just don’t understand why.

In Litespeed Cache I have iframe lazy loading completely disabled, and I have also put is-type-video and youtube-embed in the classes to filter out from iframe lazyload.

I am running out of ideas.

Post count: 45

On a more careful inspection, the lazyloaded class is also there when loading the page while the video is in view and goes correctly in full screen.

So can this actually be an issue with some other resources (that takes care of stretching the item to full-width) not being loaded correctly?

Post count: 35449

Hi,

Please check the Lazy Load iframes settings from the cache plugin. Go to your Media Settings, disable Lazy Load iframes and purge the cache.

Thank you!

Post count: 45

I thought I made it very clear that iframe lazyload and cache are disabled.

Do you exclude the cause could be something else?

Post count: 35449

Hi,
The iframe you’re embedding is still being modified at render time LiteSpeed (or another plugin or theme) is treating it like a lazy-load target. – https://i.imgur.com/nTvP1ZK.png https://i.imgur.com/oP6VoTW.png
Go to LiteSpeed Cache → Page Optimization → Tuning and in the “Lazy Load Excludes” field, add these rules each on its own line: iframe youtube.com
If the problem still persists and is possible to provide temporary access to the website please contact us via email at contact@tagdiv.com.
Thank you!

Post count: 45

Hi, sorry for the late reply.

The LiteSpeed Cache → Page Optimization → Tuning → “Lazy Load Excludes” field doesn’t exist even on the latest version (https://docs.litespeedtech.com/lscache/lscwp/pageopt/#tuning-tab).

In Media Settings I have “Lazy Load Iframes” set to OFF.

BUT, I found the culprit. EWWW Image Optimizer also had a Lazy Loading option for the images and, as soon as I disabled it, the embed started showing up correctly again.

Post count: 35449

Hi,

I’m glad you were able to identify and resolve the issue! It’s definitely recommended to use only one instance of “LazyLoad” to avoid conflicts.

Thank you!

Viewing 9 posts - 1 through 9 (of 9 total)
The forum ‘Newspaper’ is closed to new topics and replies.