We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9565bce commit f7d12bcCopy full SHA for f7d12bc
src/wp-admin/includes/image.php
@@ -103,10 +103,14 @@ function wp_get_missing_image_subsizes( $attachment_id ) {
103
$imagesize = wp_getimagesize( $image_file );
104
}
105
106
+ // Fallback to the "full" size dimensions.
107
+ $full_width = 0;
108
+ $full_height = 0;
109
+
110
if ( ! empty( $imagesize ) ) {
111
$full_width = $imagesize[0];
112
$full_height = $imagesize[1];
- } else {
113
+ } elseif ( ! empty( $image_meta['width'] ) && ! empty( $image_meta['height'] ) ) {
114
$full_width = (int) $image_meta['width'];
115
$full_height = (int) $image_meta['height'];
116
0 commit comments