gatsby-transformer-cloudinary icon indicating copy to clipboard operation
gatsby-transformer-cloudinary copied to clipboard

Aspect ratio transformation not working

Open hazzyeer opened this issue 4 years ago • 3 comments

Hello, It seems that there is a bug when trying to get a fluid image object with an aspect ratio transformation.

query Query {
  product {
    image {
      fluid(transformations: "ar_0.74,c_fill") {
        ...CloudinaryAssetFluid
      }
    }
  }
}

I have as an error:

Error: Cannot return null for non-nullable field CloudinaryAssetFluid.aspectRatio.

hazzyeer avatar Feb 21 '21 21:02 hazzyeer

Hi, could you use the latest version? Pushed an update to the types. Let me know if it works.

Chuloo avatar Feb 22 '21 10:02 Chuloo

Using the latest version 2.2.3 didn't solve my problem, but using chained instead of transformations fixed my problem.

query Query {
  product {
    image {
      fluid(chained: "ar_0.74,c_fill") {
        ...CloudinaryAssetFluid
      }
    }
  }
}

hazzyeer avatar Feb 22 '21 19:02 hazzyeer

I can't seem to reproduce this, did you try other transformations aside 'ar' in the transformations param?

Chuloo avatar Feb 24 '21 11:02 Chuloo