[wp-trac] [WordPress Trac] #31228: The "+" character in add_image_size breaks wp_get_attachment_image
WordPress Trac
noreply at wordpress.org
Wed Feb 4 04:09:49 UTC 2015
#31228: The "+" character in add_image_size breaks wp_get_attachment_image
-------------------------------+------------------------------
Reporter: ashorlivs | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.1
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Changes (by joemcgill):
* keywords: => reporter-feedback
Comment:
Hi ashorlivs,
I can't reproduce this error on WP 4.1. Can you try dumping the metadata
for an image you upload after adding the image sizes? Something like this:
{{{
$meta = wp_get_attachment_metadata( $id );
var_dump($meta);
}}}
You should see an array of sizes available for the image by passing the
image's ID to `wp_get_attachment_metadat()`. One of them should look
something like this:
{{{
'test + image' =>
array (size=4)
'file' => string 'elaenia.jpg-121x135.jpg' (length=32)
'width' => int 121
'height' => int 135
'mime-type' => string 'image/jpeg' (length=10)
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31228#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list