Focal point is generally a helpful solution to getting better image crops, but we have found that our clients would prefer to have more control over image cropping and a more direct sense how much an image is being cropped from the node edit page. Can this be investigated as part of the lightning authoring experience?

Comments

energee created an issue. See original summary.

phenaproxima’s picture

I completely agree about the need for a cropping solution. Big +1 there. The approach I'd like to take, however, is that users should upload full-size images into their media library, then crop them only when used. In other words, I can upload a single image, then crop it differently each time I use it. This is going to take some serious rejiggering.

phenaproxima’s picture

I suggest this as an 8.x-1.10 target.

energee’s picture

@phenaproxima, that approach sounds great to me.

saltednut’s picture

Another option re: "Crop when use" could be to use to define crop presets. This would allow for the governance site admins need while also giving editors some freedom. Happy to discuss this further - much easier to show if we can get some IA together, but the basic premise would be that the "crop" area could be limited to height and width settings based on a pre-existing standards that are used by marketers, commonly used ratios etc. E.g. Instagram (square), Facebook cover photo (850 x 315 rectangle), 4:3, 3:4, 16:9 etc.

balsama’s picture

@phenaproxima and I talked about this yesterday, but I hadn't need @brantwynn's comment til now. Basically, we decided that whatever we implement needs to be built on top of the crop api... and the the more simple image widget crop is probably preferred over focal point if we ship with something.

I don't think I fully grok what Brant is proposing. We'll touch base when we start working on this (probably this week or early next).

phenaproxima’s picture

Created an issue for bringing Crop API into Lightning: #2766381: Add Crop API to Lightning

miro_dietiker’s picture

I can upload a single image, then crop it differently each time I use it.

See dicussions in Crop API and implementations on top of it: Core does not allow per-instance crops.
A crop is bound to an image style and every image only has one instance per image style.
Core does not allow us to have multiple dynamic instances/placements of an image.
Thus cropping a media once affects all placements.

See #2617818: Support multiple crop variants per URI and crop type

Finally, if you search for the UI module that allows this explicit cropping, we have created:
https://www.drupal.org/project/issues/image_widget_crop
We are happy to improve it for even better UX.

phenaproxima’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
Component: Code » Media

Re-prioritizing for 8.x-2.x.

miro_dietiker’s picture

We have previously used image_widget crop and switched with a newer distribution to focalpoint for more simplicity for the user.

Best seems to us to start with focal point and optionally provide more control.
One option would also be to offer an optional zoom factor on focal point.

Finally, we still hope that we can integrate focalpoint with some autocropping tool that identifies faces, other objects of interest or just entropy. Other software refers to results where >95% of crops do no more need manual adjustments. That's a promising number!

phenaproxima’s picture

Status: Active » Needs review
balsama’s picture

Status: Needs review » Reviewed & tested by the community

Looks great. A few CI tweaks I'm also going to include:

  • Bumped Travis CI php version to 7.0.22 because symfony/browser-kit requires >=7.0.8 if using php 7.0
  • Pinned Drupal Console to 1.0.1 because 1.0.2 returns a non-zero exit code for update:execute if there are no pending updates

balsama’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.