Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Thomas McMahon

    (@twistermc)

    Good idea. I’ll add it to the to do list.

    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    Excellent ??

    In the meantime, I’m using this code snippet as a fix:

    add_filter( 'do_shortcode_tag', function( $output, $tag ) {
    	if ( 'pdfjs-viewer' === $tag ) {
    		$output = str_replace( '></iframe>', ' loading="lazy"></iframe>', $output );
    	}
    	return $output;
    }, 10, 2 );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Iframe lazy loading?’ is closed to new replies.