My Eyes Are Up Here: A WordPress Plugin With Automatic Face Detection for Generating Cropped Thumbnails

yoga
Yoga in Odintsovo – cc license

Ever wish you had more control over the thumbnails that WordPress generates for your media and featured images? My Eyes Are Up Here is a new plugin that helps you get the perfect crop, especially as it pertains to images with human subjects.

Ordinarily, images are cropped according to the center, which can leave out the most important part of the photo if the person’s face is on the left or right side. More awkward crops of full body shots can isolate a person’s neck down to the elbows, instead of centering around the face. This plugin aims to fix this problem by integrating a jQuery plugin which detects faces in pictures and returns their coordinates, using an algorithm written by Liu Liu.

After you install My Eyes Are Up Here, there are no setting to configure. A new “face detection” section is added to the image editing options. The plugin’s built-in face detection comes in two parts: automatic detection and manual detection via assigned hotspots.

face-detection-attachment-details

The basic face detection is fairly intuitive but it won’t always find everything. That’s why there’s a secondary option to set hotspots to highlight faces that were missed. When you’re finished adding hotspots, click the “finished” button in the editing pane to initiate a re-crop of the image. The resulting thumbnail images will be cropped according to your specifications to highlight faces.

faces

When multiple hotspots or faces are detected, the plugin will attempt to crop the image to include as many hotspots in the thumbnail as possible. Otherwise, it will crop around the center of the hotspots.

If your theme makes heavy use of featured images with human subjects, this plugin will help you to get the desired crop around faces and avoid the dreaded crotch shot. My Eyes Are Up Here was created by the folks at interconnect/it. You can download it for free from WordPress.org or check out the project on GitHub.

12 Comments


  1. Yeah, I thought this was a cool plugin idea as well. I always seem to have to crop headshots and other images of humans in Photoshop prior to upload. I just worry this is unnecessary bloat. Core?

    Report


    1. If a plugin is good it may eventually find it’s way into core but not before it’s widely used. The plugin is actually pretty lightweight, if it solves a problem then I wouldn’t say its bloat but then I’m biased :)

      Report


      1. “The plugin is actually pretty lightweight” Good to hear. Glad to know it’s at least on your mind.

        Report


      2. I can’t really see this becoming part of WP core – seems more like plugin territory.

        Report


      3. I could see something like this being wrapped up into the core image/media editing features of WordPress. Way down the road….

        Report


  2. I can’t wait to test this.

    Report


  3. Nice! I’ve run into some really awkward auto-crops, not just on WordPress uploads but Flickr too. I’m going to have to try it out.

    Report


  4. Thanks for the write-up! We wrote the plugin to solve problems we experienced on client sites and felt it was worth sharing. Let’s see how it gets on!

    Report


  5. The best way to use the plugin is by adding a hotspot rather than use the face detection as it’s not always accurate. All the advanced face detection APIs are paid for so wasn’t able to integrate them just yet!

    Report


  6. Great Plugin – works awesome and really solves the problem!!

    Report


  7. I tried it on one of my sites and I love it. It’s not just for faces — any kind of image where the subject is off-center (and if you’re using something like the rule-of-thirds when you frame your shot, isn’t it always off-center?) would benefit from adding an appropriate hot spot.

    The face recognition bit is still sketchy. I found that maybe one out of every ten images, all with obvious faces, were detected. But it’s no big deal to select a hot spot — and as sanchothefat indicates, if you’re concerned with good cropping you are going to want to manually select the subject’s chin, or nose, or left eye, or whatever manually, to get it just right.

    Report

Comments are closed.