Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Evans 137 posts 353 karma points c-trib
    Oct 13, 2020 @ 02:58
    Chris Evans
    0

    Heartcore : Media crop with focal point from GraphQL

    Hi all,

    Does anyone know if it's possible to get a cropped media url to prefer the focal point as set in the media library, using Heartcore with the GraphQL API?

    Essentially, the equivalent of doing this in standard Umbraco 8 on a Media Picker property:

    GetCropUrl(300, 300, preferFocalPoint: true)
    

    There is a preferFocalPoint option mentioned in the documentation here:

    https://our.umbraco.com/documentation/Umbraco-Heartcore/API-Documentation/GraphQL/Schema-Generation/

    but it seems only to relate to the ImageCropper type rather than the Media type. When I try to use it in the GraphQL playground on a Media property, I get an error:

    "message": "Unknown argument \"preferFocalPoint\" on field \"url\" of type \"Media\"."

    Is there another way to honour the focal point setting of selected Media when querying via GraphQL?

    Cheers, Chris

Please Sign in or register to post replies

Write your reply to:

Draft