Updated: Comment #0
Problem/Motivation
A primary motivation for using the Media module is the ability to maintain a library of media resources, which can then be reused in multiple places throughout a website. One image may be used in different contexts on dozens of nodes, each authored by a different user. It stands to reason that each user placing an image in their content would like to control the cropping of that image as it appears in their content.
Currently the Manual Crop module tracks cropping for the file itself, rather than for the instance of that file's use. As such, any user changing the cropping of an image will end up changing the cropping for all instances of that image, rather than just the cropping on their specific node.
Proposed resolution
Provide an option to track media field cropping per instance, in addition to per file. If enabled, Manual Crop should track the entity ID in which an image resource is being used. Any cropping on the base file itself could be saved with an entity ID of 0, indicating it is the default crop. If cropping is specified on the instance of a media field, then that would override the default cropping in that instance.
Remaining tasks
- Define the architectural changes
- Create a patch
- Commit it!
User interface changes
In the Manual Crop settings for a media field, there will be a checkbox to "Allow cropping per-instance."
If per-instance cropping is enabled, then a Manual Crop interface will be displayed on the entity edit form, just under the media field, without requiring a user to edit the media entity itself.
API changes
TBD
Comments
Comment #1
dkingofpa commentedDuplicate of #1890438: manualcrops that are applied to the same file and image style interfere with each other