I think the underlying issue here is with Focal Point itself, and I've raised an issue here, but this might be relevant to anyone else in a similar situation as mine, using Single Content Sync.
I'm migrating content that is full of media reference fields, the images contained having focal point settings. When I imported the YAMLs, I saw that the focal points were being lost, and tracked it down to this plugin not capturing those dimensions and saving them on export.
It turns out that the dimensions aren't being saved to begin with in the crop_field_data table by Focal Point, so even though we are getting field_original_image_height and field_original_image_width in the export, they're not available at the point in File::exportBaseValues() where the crop values get saved.
For now I've worked around it with the patch attached here. I'm not 100% certain of its correctness, of course, but so far it seems to be doing what I need.
| Comment | File | Size | Author |
|---|---|---|---|
| handle_focal_point_cropped_width_and_height.patch | 3.04 KB | datawench |
Comments
Comment #2
datawench commentedComment #3
datawench commentedScratch that. I figured out how to use your event system to avoid hacking. I'm closing this, and showing my code here in case anyone's interested.
Comment #4
datawench commented