Skip to content

Commit a243ccb

Browse files
committed
Use URL instead of base64 for iframe to prevent issue with in-app browser
1 parent 18db3f4 commit a243ccb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

inc/front/lazyload.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ function rocket_lazyload_iframes( $html ) {
246246
}
247247

248248
/** This filter is documented in inc/front/lazyload.php */
249-
$placeholder = apply_filters( 'rocket_lazyload_placeholder', 'data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=' );
249+
$placeholder = apply_filters( 'rocket_iframe_lazyload_placeholder', get_rocket_cdn_url( WP_ROCKET_FRONT_URL . 'img/blank.gif' ) );
250250

251251
$iframe = preg_replace( '/<iframe(.*?)src=/is', '<iframe$1src="' . $placeholder . '" data-lazy-src=', $iframe );
252252

@@ -301,4 +301,4 @@ function __rocket_lazyload_on_srcset( $html ) {
301301
}
302302

303303
return $html;
304-
}
304+
}

0 commit comments

Comments
 (0)