diff --git a/src/wp-includes/theme-compat/embed-content.php b/src/wp-includes/theme-compat/embed-content.php
index f706c68..b0db9b1 100644
a
|
b
|
|
30 | 30 | $meta = wp_get_attachment_metadata( $thumbnail_id ); |
31 | 31 | if ( ! empty( $meta['sizes'] ) ) { |
32 | 32 | foreach ( $meta['sizes'] as $size => $data ) { |
33 | | if ( $data['width'] / $data['height'] > $aspect_ratio ) { |
| 33 | if ( ($data['width'] > 0 && $data['height'] > 0) && $data['width'] / $data['height'] > $aspect_ratio ) { |
34 | 34 | $aspect_ratio = $data['width'] / $data['height']; |
35 | 35 | $measurements = array( $data['width'], $data['height'] ); |
36 | 36 | $image_size = $size; |