Fixing the “Video Outside the Viewport” Google Seach Console Errors
If you’re seeing “Video Outside the viewport” errors in Google Search Console, it means some of your videos are not fully responsive to users screen sizes when the page loads. This usually happens when the video player is lower on the page and users need to scroll down to see it.
The good news is; you found the easy fix:
🏆 Solution: Enabling Responsive YouTube Embeds
Simply add one line of code to your theme’s functions.php file:
Step 1 – Log in to WordPress admin and go to Appearance > Theme Editor
Step 2 – Click to edit the functions.php file
Step 3 – Add this code:
add_theme_support( ‘responsive-embeds’ );
Step 4 – Save changesđź‘Ť
Your YouTube embeds in WordPress posts and pages are not responsive due to your theme not supporting responsive embeds. However, You just found the good news – fixing this issue is that simple!
The Core of the Issue: Theme Support for Responsive Embeds
Recently updated WordPress themes often don’t call the “responsive embeds” theme support function. This results in YouTube videos staying static in size, instead of resizing responsively for mobile devices.
While it seems the new Gutenberg editor is related, the root cause lies with themes not enabling responsive embed support. So calling this function is the key to fix non-responsive YouTube embeds.
This will tell your theme to support responsive embeds across your site. Embedded YouTube videos will now resize responsively, ensuring proper display on all devices.
Extra Help for the Video Outside the Viewport GSC Issue!
Enhance YouTube Embeds with Plugins
While WordPress supports embedding YouTube videos without any plugins, there are some handy plugins that add extra functionality:
đź“Ľ Lazy Load Videos
This lightweight plugin delays loading video embeds until the user clicks on them. This speeds up load times, improving site performance.
đź“Ľ YouTube Gallery Plugin
Want to showcase videos on a dedicated page? This plugin lets you create YouTube video gallery pages to highlight your channel or playlists.
đź“Ľ Video Gallery – YouTube Gallery
Another gallery plugin, this one focuses just on YouTube videos. It has responsive layouts to showcase your videos on any device.
đź“Ľ WP Video Lightbox
Make your videos stand out by displaying them in a popup lightbox. When users click a video, it expands to fullscreen with a blurred background.
đź“Ľ Testing Plugin Compatibility
As with any plugin, be sure to test how they interact with your theme. Check that your responsive YouTube embeds continue working properly with any additional functionality added.
These plugins might will give you more options for showcasing YouTube videos across your WordPress site!
Closing the Case
Embedding YouTube videos in your WordPress site is a great way to enhance content and engage visitors. However, if videos fail to resize or display properly across devices, the user experience suffers.
Luckily, implementing responsive embed support is a straightforward one-line update.
By adding the recommended code snippet to your active theme’s functions.php file, you enable fluid responsive YouTube embeds site-wide. Videos will then scale gracefully to match any screen size. We covered compatible plugins as well, for additional video gallery, performance, and display options.
With the right theme support enabled, you can confidently embed YouTube videos knowing they’ll contribute to—not detract from—your website’s reliability and visit quality. Smoothly responsive video embeds improve engagement and keep visitors focused on your content, boosting your WordPress site’s credibility and authority over time through optimal on-site UX.