diff --git a/inc/tag_replacer.php b/inc/tag_replacer.php index 48e8bd17..6e938688 100644 --- a/inc/tag_replacer.php +++ b/inc/tag_replacer.php @@ -451,6 +451,9 @@ public function filter_sizes_attr( $sizes, $size ) { */ public function filter_image_downsize( $image, $attachment_id, $size ) { + if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) { + return $image; + } $image_url = wp_get_attachment_url( $attachment_id ); if ( Optml_Media_Offload::is_uploaded_image( $image_url ) ) { return $image;