You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
However, if I cast the object manually, like this fluid={data.image.childImageSharp.fluid as FluidObject } (as FluidObject) everything works fine. The image loads and I'm all good. However is this the right way? what am I doing wrong?
I am not sure if this is a bug but I checked through the issues and couldn't find any. Except #54 but that got me no where.
When I am writing an image query like this
These are the types generated for that query
Now, whenever I am trying to use the Fluid image object for gatsby-image's Img tag like this
I get this error and the compile fails
However, if I cast the object manually, like this
fluid={data.image.childImageSharp.fluid as FluidObject }
(as FluidObject) everything works fine. The image loads and I'm all good. However is this the right way? what am I doing wrong?Here is my plugin config
Environment:
Windows 10,
"gatsby-plugin-ts": "^2.7.1", "gatsby": "^2.27.2", "gatsby-image": "^2.6.0",
Any corrections/suggestions appreaciated! Thanks!
The text was updated successfully, but these errors were encountered: