diff --git a/php/media/class-filter.php b/php/media/class-filter.php index 8fe23347b..3a30aee35 100644 --- a/php/media/class-filter.php +++ b/php/media/class-filter.php @@ -729,7 +729,7 @@ public function catch_media_templates_maybe() { * @return string */ public function filter_image_block_render_block( $block_content, array $block ) { - if ( 'core/image' === $block['blockName'] && ! empty( $block['attrs']['overwrite_transformations'] ) ) { + if ( 'core/image' === $block['blockName'] && ! empty( $block['attrs']['overwrite_transformations'] ) && ! empty( $block['attrs']['id'] )) { $block_content = str_replace( 'wp-image-' . $block['attrs']['id'], 'wp-image-' . $block['attrs']['id'] . ' cld-overwrite', $block_content ); }