Media export format when cropping is used

Created on 29 April 2025, 16 days ago

We have nodes with paragraphs, which themselves have fields configured to use the media_library_media_modify plugin widgets, which in turn are enabling "contextual cropping" via crop and media_contextual_crop.

When all this exported, we get a snippet of yaml which, unlike more conventional media reference fields, look like this:

field_photo_crop:
          -
            target_id: '3288'
            overwritten_property_map: '{"path":[{"alias":"","pid":null}],"field_media_image":[{"image_crop":{"crop_wrapper":{"crop_1040_x_427":{"crop_container":{"values":{"crop_applied":"1","x":"0","y":"976","width":"3262","height":"1339"},"reset":"Reset crop"}}},"file-uri":"public:\/\/2024-10\/some-file.jpg","file-id":"111111"}}]}'

Since this contains only the target_id, rather than all the nice URI stuff and the related asset, it's not going to migrate. Presumably (though I haven't tested this yet), it might import "as is", but of course we can't know that we won't be overwriting an existing target_id in the destination environment.

Obviously, this has much more to do with those other plugins, but I'm wondering if there are any quick thoughts here on how to account for this. Even though the other plugins are causing the issue, I think the solution is going to wind up being hooking/extending this one, and I'd appreciate any guidance in that area.

πŸ’¬ Support request
Status

Active

Version

4.0

Component

Export

Created by

πŸ‡ΊπŸ‡ΈUnited States datawench

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

Comments & Activities

Production build 0.71.5 2024