ImgIX "fit: crop" and "crop: faces" do not work in GraphQL image processing

If you issue a GraphQL query with the code below, you will not get a croping centered on a person's face.

query MyQuery {
  allPrismicBlog {
    edges {
      node {
        id
        uid
        data {
          image {
            thumbnails {
              ThumbList {
                gatsbyImageData(
                  imgixParams: {fit: "crop", crop: "faces", fm: "webp", q: 20, w: 272, h: 153}
                )
              }
            }
          }
        }
      }
    }
  }
}

The "rect" parameter not specified in the query will be added to the retrieved gatsbyImageData URL.
If you remove this "rect" parameter from the URL, the image will be cropped as intended.
Is there a way to not add this automatically added "rect" parameter?

Was self resolved.

If you use gatsbyImageData of main size auto instead of gatsbyImageData below the thumbnail, rect will not be attached.

The desired shape was achieved by specifying the width and height of the image, not the parameters of ImgIX.

The image part of the query has been rewritten like this.

image {
  gatsbyImageData(
    imgixParams: {fit: "crop", crop: "faces", fm: "webp", q: 20},
    width: 272,
    height: 153
  )
}

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.