Looking at the documentation for Cropping Thumbnails when adding new image-sizes makes me confused.

Set the image size by cropping the image and defining a crop position:

add_image_size( 'custom-size', 220, 220, array( top, left ) ); // Hard crop top left

When setting a crop position, the first value in the array is the x axis crop position, the second is the y axis crop position.

x_crop_position accepts 'left' 'center', or 'right'. y_crop_position accepts 'top', 'center', or 'bottom'.

By this array(top, left) wouldn't be "allowed" because top is only allowed by y-crop position ?

  • Please add quotes from pages in blockquote, and don't use bold wording unnecessary, it is taken as shouting if used inappropriately. Apr 30, 2014 at 9:47
  • 1
    You actually have a valid point here. According to what the $crop parameter say, it should be array(left, top), not array(top, left). Can anyone collaborate on this? Apr 30, 2014 at 19:34
  • Just a note to the moderators, I've added the tag wordpress.org as this is codex related question that I feel is valid, check my previous comment Apr 30, 2014 at 19:38

1 Answer 1


As @PieterGoosen said, your point is valid. A look into the source confirms that the codex description of add_image_size was wrong there. It was, because I changed it to be correct. That said, everyone can help improving the codex, you just need to register. You might want to take a look at Contributing to WordPress for a introduction on how to do that, the first section is about the documentation aka codex.

  • Ok. Thanks a lot! I would probably register for improving the codex as well. May 1, 2014 at 12:02
  • Thanks for clearing this up, I wasn't hundred percent sure. +1 for this and the extra info you provided May 1, 2014 at 12:59
  • 1
    My pleasure, I guess I was just a little bit quicker. Besides that, this just proofs once gain the beauty of open information collaborating systems. @bestprogrammerintheworld May 1, 2014 at 17:36
  • @PieterGoosen Sure thing, this just made me curious, so took a closer look. Otherwise the same as I said in the previous comment..don't want to repeat myself here. May 1, 2014 at 17:40
  • HAHAHA Understood! May 1, 2014 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.