Create images with focal_point through jsonapi

Created on 16 September 2025, 25 days ago

Problem/Motivation

I want to create images through jsonapi with the focal point set

Proposed resolution

Expand the doTransform function

API changes

Example of a body with the focal point set

{
    "data": {
        "type": "media--image",
        "attributes": {
            "name": "Image without focal point"
        },
        "relationships": {
            "field_media_image": {
                "data": {
                    "type": "file--file",
                    "id": "xxxx",
                    "meta": {
                        "focal_point": {
                            "x": 700,
                            "y": 400
                        }
                    }
                }
            }
        }
    }
}
Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium waropd

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.

No activities found.

Production build 0.71.5 2024