0

Thanks for a great plugin.

I have a listing site listing volunteer groups (https://www.hittahjalpen.se/) where I want to embed the facebook group each group has instead of a regular links as we have now. Details for each group is hidden under a read more and right now we list all groups (app. 100) on the initial load. If I then include the shortcode to list each group embed the browser starts to download the final embed for all groups which is very heavy for the user.

So I have 2 questions:
1) Is it possible to have the final embed also include the loading attribute (https://web.dev/native-lazy-loading/) so that the iframe is lazy loaded in browsers that support this?
2) Is there any hooks I can use and/or javascript to only trigger the javascript to transform the placeholder div to an actual embed so I could initiate this eg when someone clicks the read more button and/or if I decide to implement some other type of infinite scroll so I don’t need to load all enties at once and instead load more entries using ajax eg on click or scroll?

Appreciate the help!

/Johan

Answered question