Integrate focal point with file entity and entity browser

Created on 7 April 2016, over 8 years ago
Updated 11 June 2024, 6 months ago

Problem/Motivation

The focal point module expects the image field widget to be of the 'image' type. When using entity browser the widget needs to be changed and that stops this focal point from working with images placed in this way.

Proposed resolution

Integrate focal point with file entity so that after selecting an image through entity browser the user/editor can edit the file entity where they will see the focal point preview widget in the file entity modal dialog, allowing them to select an appropriate focal point.

Steps for testing

  • Enable file entity module
  • Create a content-type, attach a file field (cardinality: unlimited)
  • Go to "Manage form display", select "Editable file" as field widget
  • Create a node and upload a image, click on the "Edit" button next to the uploaded file
  • The file entity overlay should display a preview of the image, the focal point widget and a focal point preview link
  • Set focal point
  • Submit the overlay, save the node
  • View the node

Remaining tasks

More testing by users to confirm this works with the 'image' widget as well as the 'entity browser' and 'editable file' widgets.

User interface changes

A focal point provided thumbnail with crosshair is displayed in a file entity modal dialog where a user can make their focal point selection and also preview the results of their selection. This is also displayed when editing a file through /admin/content/files.

Original report by Andreas Speck

We are using File Entity Browser to populate image fields. I am looking for a way to nevertheless use Focal Point, but how?

From Focal Point's README, I gather I need to set the Focal Point as the image widget on the from display settings page - which I can't do if I want to use File Entity Browser to allow for uploading and selection of existing image files.

Is there a way to nevertheless use Focal Point to crop and scale the image only for this one instance where it is used (and different for another instance)? How would I go about that?

Feature request
Status

Closed: outdated

Version

2.0

Component

Media Integration

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024