[wp-trac] [WordPress Trac] #7495: Insert image into post always
inserts full size.
WordPress Trac
wp-trac at lists.automattic.com
Mon Aug 11 16:10:06 GMT 2008
#7495: Insert image into post always inserts full size.
----------------------+-----------------------------------------------------
Reporter: lunabyte | Owner: anonymous
Type: defect | Status: new
Priority: high | Milestone: 2.6.1
Component: General | Version: 2.6
Severity: major | Keywords:
----------------------+-----------------------------------------------------
Fresh install of WP 2.6 always inserts full image size, regardless of
settings.
This is a completely clean install of 2.6, without plugins or any
adjustments whatsoever.
PHP: 5.2.5
Apache: 2.2.8
MySQL: 5.0.45
DB Charset: utf8
DB Collation: utf8_bin
- Medium image size is created as expected
- Thumbnail size is created as expected.
- CSS class(es) added as expected
- ''URL to image is always the full size image, regardless of selecting
thumb or medium.''
Tracked down thus far:
function image_get_intermediate_size (on/about line 276) in /wp-
includes/media.php initially calls to wp_get_attachment_metadata, which is
checked to be an array. If not, returns silently.
This check fails because the value returned by wp_get_attachment_metadata
for $imagedata has failed to be unserialized.
Selecting the data directly from the database, then running unserialize
also fails to unserialize the stored data.
Using css to scale down an image isn't sufficient as the browser still
downloads the full size image.
This isn't a path/url issue, as well. All paths/urls are properly
rendered.
With the data failing to be unserialized, the check for the array in
image_get_intermediate_size will always return false.
--
Ticket URL: <http://trac.wordpress.org/ticket/7495>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list