diff --git a/src/wp-content/themes/twentytwentyone/inc/template-functions.php b/src/wp-content/themes/twentytwentyone/inc/template-functions.php
index 2bee7d6f95..6498c7dfa9 100644
a
|
b
|
function twenty_twenty_one_get_attachment_image_attributes( $attr, $attachment, |
457 | 457 | $height = (int) $size[1]; |
458 | 458 | } elseif ( $attachment && is_object( $attachment ) && $attachment->ID ) { |
459 | 459 | $meta = wp_get_attachment_metadata( $attachment->ID ); |
460 | | if ( $meta['width'] && $meta['height'] ) { |
| 460 | if ( isset( $meta['width'] ) && isset( $meta['height'] ) ) { |
461 | 461 | $width = (int) $meta['width']; |
462 | 462 | $height = (int) $meta['height']; |
463 | 463 | } |