| 93 | | $full_width = (int) $image_meta['width']; |
| 94 | | $full_height = (int) $image_meta['height']; |
| | 93 | // Use the originally uploaded image dimensions as full_width and full_height. |
| | 94 | if ( ! empty( $image_meta['original_image'] ) ) { |
| | 95 | $image_file = wp_get_original_image_path( $attachment_id ); |
| | 96 | $imagesize = @getimagesize( $image_file ); |
| | 97 | } |
| | 98 | |
| | 99 | if ( ! empty( $imagesize ) ) { |
| | 100 | $full_width = $imagesize[0]; |
| | 101 | $full_height = $imagesize[1]; |
| | 102 | } else { |
| | 103 | $full_width = (int) $image_meta['width']; |
| | 104 | $full_height = (int) $image_meta['height']; |
| | 105 | } |
| | 106 | |