Skip to content

Commit

Permalink
fix: image downsize issue when lazyload disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
girishpanchal30 committed Mar 6, 2025
1 parent 2c9e26b commit a506af1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions inc/tag_replacer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a506af1

Please sign in to comment.