Cycling-UK / cycling-uk-application

0 stars 0 forks source link

Lazy load iframes #20

Open j4-m opened 1 month ago

j4-m commented 1 month ago

iframes, and associated resources, are loaded for all users regardless of wheather the scroll to that section of the page.

j4-m commented 1 month ago

@alistair-martin @sachawellborn seems I've overlooked something here. The issuu embed code, as seen on pages such as this one, is being inserted into a text field by editors. I could preprocess this to add the load attribute but it would be hard to know whether this will always be appropriate (i.e. if the embed appeared within the viewport or not). The alternative would be to make an issuu-specific paragraph and move to an editorial flow where the issuu ID is provided rather than the entire embed code but that feels unlikely give the migration.

Do either of you have any insight on how these embeds will typically be used that might help here?