If you’ve done any Drupal site building, I’m sure you’ve experienced this issue.
You create an image style with the “Scale and crop” effect and everything is going great until an editor uploads an image with a different aspect ratio.
Now instead of images getting cropped correctly, they’re getting cut in half, or the top part is chopped off, and images are not displaying nicely.
You could fix this problem by tweaking the image style to handle different aspect ratios, but it’ll never be the perfect solution.
The best option is to crop image directly in Drupal, and this is what you’ll learn today.
In this tutorial, you’ll learn how to avoid these situations by using Crop API.
Now, Crop API doesn’t offer any interface on its own; it’s just an API. The two modules that provide an interface are Image Widget Crop and Focal Point. We’ll take a look at these modules in detail, in this tutorial.