--- /app/wp-admin/includes/image.php.orig	2023-02-26 21:42:57.687046116 +0000
+++ /app/wp-admin/includes/image.php	2023-02-26 21:40:41.349180739 +0000
@@ -89,11 +89,11 @@

 	$registered_sizes = wp_get_registered_image_subsizes();
 	$image_meta       = wp_get_attachment_metadata( $attachment_id );

 	// Meta error?
-	if ( empty( $image_meta ) ) {
+	if ( empty( $image_meta ) || !array_key_exists('width', $image_meta) || !array_key_exists('height', $image_meta) ) {
 		return $registered_sizes;
 	}

 	// Use the originally uploaded image dimensions as full_width and full_height.
 	if ( ! empty( $image_meta['original_image'] ) ) {
