[wp-trac] [WordPress Trac] #22693: Inserted images in some cases get the wrong size

WordPress Trac noreply at wordpress.org
Mon Dec 3 10:29:48 UTC 2012

#22693: Inserted images in some cases get the wrong size
 Reporter:  jond3r           |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Media
  Version:  trunk            |   Severity:  normal
 Keywords:                   |
 This is a bug I have not seen reported yet, and I think is of some

 It manifests itself for smaller images that don't have all the standard
 sizes (thumbnail, medium and large),
 and is dependent on the user's previous choice of image size (which I
 believe is stored in a cookie).

 Here's a scenario:
 - The user's latest inserted image was medium sized.
 - Next he selects an image that is around 200x200 px, so that it has a
 thumbnail, and a full size, but no medium size.
 - In the size drop-down box, is shown "Thumbnail". The user doesn't change
 this, and presses "Insert into post"
 - The result is that the full-size image is inserted, and the image class
 gets a value of 'size-medium', i.e. two wrongs.

 You can come up with several similar scenarios, involving different image
 sizes and previous choices.

 What I think happens is that if the size value in the drop-down box is not
 changed actively by the user, the previous value is reported back to the
 server. A value that might not be valid for the current image, and is also
 not shown in the UI.

 This might need some JavaScript programming to fix. I'm not sufficiently
 familiar with the code in question, so no patch is provided.
 Sorry for the late submission.

Ticket URL: <http://core.trac.wordpress.org/ticket/22693>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list