queen-raae / gatsby-remark-oembed

A GatsbyJS Plugin that transforms oembed links into its corresponding embed code.
https://gatsby-remark-oembed.netlify.com/
MIT License
162 stars 25 forks source link

Add lazy loading to iframe #109

Closed nickytonline closed 3 years ago

nickytonline commented 3 years ago

Description

iframes are essentially a document being loaded in a document. Even one on a page can create performance issues potentially. This PR adds the loading attribute with the value "lazy", so that any <iframe /> embedded via the @raee/gatsby-remark-oembed package will be lazy loaded for browsers that support it.

The work here depends on #108 being closed first.

Related Issues

Closes #107

A sloth smiling very slowly at the DMV counter in the movie the Secret Life of Pets

raae commented 3 years ago

I squash merged the other PR, so getting a conflict here @nickytonline. Would you like to fix, or should I do it?

nickytonline commented 3 years ago

I'll fix the conflict. 😎

nickytonline commented 3 years ago

It's all good now @raae.

raae-bot commented 2 years ago

:tada: This PR is included in version 0.2.0-next.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

raae-bot commented 2 years ago

:tada: This PR is included in version 0.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: