blazy icon indicating copy to clipboard operation
blazy copied to clipboard

Is it possible to use JS to alter src to data-src on iframe?

Open uglyeoin opened this issue 6 years ago • 2 comments

If I want to use this on an iFrame I need to manually rename them all from src to data-src. This should probably be done on document load.

Blazy doesn't work on document load does it? Is there a solution to this?

uglyeoin avatar Jul 20 '19 14:07 uglyeoin

@uglyeoin I would do it in the html so you initialize the markup with data-src. But answering you question, yes its possible buy you need to do it as early as possible

dinbror avatar Nov 09 '20 09:11 dinbror

But it is not HTML this is a CMS, so things are load dynamically. I'll see if there is a way to do it earlier in the process.

uglyeoin avatar Nov 09 '20 14:11 uglyeoin