Skip to content

Commit a506af1

Browse files
fix: image downsize issue when lazyload disabled
1 parent 2c9e26b commit a506af1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

inc/tag_replacer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,9 @@ public function filter_sizes_attr( $sizes, $size ) {
451451
*/
452452
public function filter_image_downsize( $image, $attachment_id, $size ) {
453453

454+
if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) {
455+
return $image;
456+
}
454457
$image_url = wp_get_attachment_url( $attachment_id );
455458
if ( Optml_Media_Offload::is_uploaded_image( $image_url ) ) {
456459
return $image;

0 commit comments

Comments
 (0)