There could be several reasons why a YouTube video might not be displaying correctly on your Webflow site. Let's explore some common issues and solutions.
1. Check Video Embed Settings
- Ensure the YouTube video link is correct. Copy the correct URL from the YouTube video page.
- Verify settings like privacy restrictions. Make sure the video is public and embeddable.
2. Verify Element Visibility
- Make sure the div element is visible. Check that the div isn't hidden through CSS (e.g., display: none).
- Confirm that styles are not affecting visibility. Ensure that CSS styles or interactions aren't hiding the video.
3. Confirm Embed Code Format
- Use the correct embed format. Instead of a raw link, use the embed code provided by YouTube.
- Ensure the iframe tag is properly formatted. While Webflow doesn't allow raw HTML in this response, make sure attributes like width and height are correct within the Webflow Embed element.
4. Optimize Loading and Options
- Check lazy loading settings. If using
loading="lazy", confirm it doesn't delay the video unnecessarily. - Use the
?rel=0 option to prevent showing related videos at the end.
Summary
To resolve the issue of a missing YouTube video in Webflow, ensure the embed settings are correct and the div is visible. Verify the format of the embed code and optimize any loading settings to support video visibility.