cropping to show top of an image instead of middle

Posted in: Newspaper
Post count: 24

Is there any way to have the automatic cropping of images default to the top of the photo rather than the middle? I have all sorts of photos created in the past that are showing the chest of people rather than their faces. Looks terrible 🙁

Thanks.

Post count: 9544

Yes. Sort of. Technically there is a hack for the WordPress core code for the thumbnail generator — not part of the theme.

However great news for all! The hack widely used (done back in 2011!!!!!), is being rolled into WordPress 3.9 ( $crop parameter in the add_image_size function ).

So, wait just a little bit for WP 3.9 which will solve a wide variety of the “duh” things folks have been asking for since WP 3 launched.

I’m sure once 3.9 is live, Radu/co will put the option in there someplace, since crop from top vs middle-out is more useful for most.

There is a plugin I recommended to somebody else this past week here on the forum, which allows you to specify crop position on upload of image, in a 9 box grid (should be built in to WP, but isn’t).

E.g., in WP 3.9
the functions can be set as so with a crop direction

add_image_size( 'screenshot', 300, 300, array( 'left', 'top' ) );

WP 3.9 also adds HTML5 image galleries (won’t need to use JetPack!); and also audio/video PLAYLISTS!!

Page template filters will really help those who need more “different blah on page blah” stuff.

  • This reply was modified 12 years by simchris.
Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.