Skip to content

Commit 498fe93

Browse files
committed
if size not found, get basic full
1 parent 7d5663b commit 498fe93

File tree

1 file changed

+2
-3
lines changed
  • cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php

1 file changed

+2
-3
lines changed

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-media.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -574,10 +574,9 @@ public function cloudinary_url( $attachment_id, $size = array(), $transformation
574574
// Check size and correct if string or size.
575575
if ( is_string( $size ) || ( is_array( $size ) && 3 === count( $size ) ) ) {
576576
$intermediate = image_get_intermediate_size( $attachment_id, $size );
577-
if ( ! is_array( $intermediate ) ) {
578-
return false;
577+
if ( is_array( $intermediate ) ) {
578+
$size = $this->get_crop( $intermediate['url'], $attachment_id );
579579
}
580-
$size = $this->get_crop( $intermediate['url'], $attachment_id );
581580
}
582581

583582
/**

0 commit comments

Comments
 (0)