[wp-trac] [WordPress Trac] #26846: add_image_size "favoring" height instead of generating specific dimensions...
WordPress Trac
noreply at wordpress.org
Thu Jan 16 14:37:50 UTC 2014
#26846: add_image_size "favoring" height instead of generating specific
dimensions...
-------------------------------+------------------------------
Reporter: alturic | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 3.8
Severity: normal | Resolution:
Keywords: reporter-feedback |
-------------------------------+------------------------------
Comment (by alturic):
I'd dare say it's any size to be honest. As I said, it seems like if
height is specified it completely ignores the width setting, but if height
is 0 then it uses the width setting.
To directly answer your question though the three images I used were:
2200x1467, 1348x718 and 1440x900 and I tried it with and without plugins
of course.
To elaborate a little further though, I tested this with a completely
fresh 3.8 install using twentyfourteen and twentythirteen (obviously
adding the add_image_size code) and still came up with the same problem. I
then did a testbed install (to ensure it wasn't something I did with my
theme) of 3.7.1 and using twentythirteen it made the correct dimensions
specified as well as my theme made the correct dimensions specified (and
that was with a complete copy of the same theme folder so that completely
rules out the theme/theme incompatibility with 3.8.
Not harping on you for changing the severity (seriously) but unless
something changed in 3.8 with the way it handles dimensions the
code/dimensions generate perfectly on 3.7.1 so I'd say it is a critical
bug potentially even a game-breaking bug for production sites. Even
talking to some people in IRC made it seem like they knew about it and
were holding off on upgrading because of it.
It's easily reproducible, just add my code: add_image_size('art-slide-
med', 700, 415, true); to any of the default themes on 3.8 and you should
see it makes the image something like (I believe this is the sizes it
made) 694x435. If I changed my code to something like 700, 435 it would
then make the image something like 709x4XX, regardless as I said for some
reason it just seems like if height is specified in 3.8 it completely
throws out the width setting.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26846#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list