This project is not covered by Drupal’s security advisory policy.

A GraphQL extension module that exposes focal point coordinates for image fields.

Features

  • Adds focalPoint field to FieldItemTypeImage in GraphQL.
  • Provides coordinates in multiple formats:
    • Percentage values (0-100)
    • Normalized values (0-1)
    • String formats for both

Post-Installation

Enable "Focal Point Extension" on the graphQL server configuration and clear caches.

Usage:

query {
  node(id: "123") {
    ... on NodeArticle {
      fieldImage {
        focalPoint {
          x                        # 50 (percentage)
          y                        # 75 (percentage)
          coordinates              # "50,75"
          xNormalized              # 0.5 (0-1 range)
          yNormalized              # 0.75 (0-1 range)
          coordinatesNormalized    # "0.5,0.75"
        }
        url
        alt
      }
    }
  }
}
Supporting organizations: 
Development

Project information

Releases