wp_get_attachment_image() displays larger images than necessary with an array
|Reported by:||tomthewebmaster||Owned by:|
WordPress is not giving me the most optimized image when I use an array with the wp_get_attachment_image() function in the WordPress 3.0 builds.
I used the following code on a page: <?php echo wp_get_attachment_image(60, array(200,200), false); ?>. While the correct sized image is displayed on the page, WordPress is using the full size image to scale from, instead of scaling from the medium size image. I am given the most optimized image (medium) as expected in WordPress 2.9.2.
See these examples:
WordPress 3.0 nightly build, where the full size image is used: http://jingletom.com/beta/image-test-2/
WordPress 2.9.2, where the medium image is used: http://tomlany.net/use-the-attachment-image/image-test/
In both cases, you want to look at the top image on the page. Right click on the images to see the different sized images that are being used. In both cases, the medium image is set to be the default 300x300 in the administration panel.
Let me know if anyone has any questions. Thanks!