DEV Community

Discussion on: Lazy load embedded YouTube videos

Collapse
 
thesureshg profile image
Suresh Kumar Gondi

This works cool, and a lot weight has been reduced. Just that we need to make the final iframe code responsive.

I did checked it's not responsive yet.

Thanks for the awesome job, mate.

Collapse
 
doveranalyst profile image
RJ Mrunmayee

Inorder to make it responsive you just have to add a div class with responsive iframe (whatever you've set in your css).

Put this whole code inside a parent

and it is responsive.

Demo:

doveranalyst.com/p/videos.html
Collapse
 
thesureshg profile image
Suresh Kumar Gondi

Thank you :)