From 32b4cbe0da4a8cb3dc4ef1cba2d649c9b0c0e6d3 Mon Sep 17 00:00:00 2001 From: westi 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: http://svn.automattic.com/wordpress/trunk@14700 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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'] ) ); }