From fec613607a98262896889cfb9534ecc57bf191ca Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Sun, 16 May 2010 21:02:34 +0000 Subject: [PATCH] Use the attachment metadata to get the size infomation rather than making an HTTP request for the image in the attachment template. git-svn-id: https://develop.svn.wordpress.org/trunk@14700 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-content/themes/twentyten/attachment.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'] ) ); }