diff --git a/wp-content/themes/twentyten/attachment.php b/wp-content/themes/twentyten/attachment.php
index 22940592de..168347f0d2 100644
--- a/wp-content/themes/twentyten/attachment.php
+++ b/wp-content/themes/twentyten/attachment.php
@@ -42,13 +42,13 @@
);
if ( wp_attachment_is_image() ) {
echo ' | ';
- $size = getimagesize( wp_get_attachment_url() );
+ $metadata = wp_get_attachment_metadata();
printf( __( 'Full size is %s pixels', 'twentyten'),
sprintf( '%3$s × %4$s',
wp_get_attachment_url(),
esc_attr( __('Link to full-size image', 'twentyten') ),
- $size[0],
- $size[1]
+ $metadata['width'],
+ $metadata['height']
)
);
}