All Collections
Troubleshooting
Features and Optimizations
NitroPack and YouTube: How to Replace Youtube iframe With Preview Image
NitroPack and YouTube: How to Replace Youtube iframe With Preview Image
Updated over a week ago

By default, our service automatically detects YouTube iframes and changes their iframe tag to img. Once a visitor clicks on the video’s thumbnail, the iframe tag will be loaded, and the video will be played.


This feature is part of our “Image Lazy Loading” set of features.

Known issues

  • Sometimes, the thumbnail quality may be a bit blurry.

  • Rarely, the thumbnail may not be the original used by the video but a snapshot of the video taken by our service.

  • The iframe element may flash upon clicking.

  • The iframe element may not visibly load (meaning the element exists but remains invisible).

How to tackle any related issues?

The best approach here will be to set the Lazy iframes to “Disabled” and refresh your cache.

This can be done via the Cache Insights or from your Dashboard.

This way, our service will no longer modify the YouTube iframes to images, and the video will be freshly served to originate from an external source.

📌 If you need any assistance or have questions, reach out to our support team at [email protected] or via this link: https://support.nitropack.io

Did this answer your question?