Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with Inconsistent Image Load for Builds #99

Open
zjr opened this issue Dec 5, 2022 · 1 comment
Open

Trouble with Inconsistent Image Load for Builds #99

zjr opened this issue Dec 5, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@zjr
Copy link

zjr commented Dec 5, 2022

Description

I'm having trouble with builds in that images loaded through localFile.childImageSharp inconsistently go missing.

In my current builds I get tons (117, to be exact) of this error:

warn [gatsby-plugin-image] Missing image prop

I wonder if it might have something to do with this: #6, and that localFile is a resolver, and that there seem to be issues with creating nodes with resolvers in Gatsby v4?

I'm also now noting this issue: #55, where the resolver is mentioned. There used to be a gatsby-source-craft#gatsby-v4 but v3.0.0 says it was about Gatsby v4 support, so I'm guessing that was merged in?

Is there some sort of way to get around this? I've had some success moving queries around but it seems there's not much I can do to consistently get all the images in build unless I start tinkering with the source plugin.

Steps to reproduce

It isn't particularly consistent. I'm generally using localFile.childImageSharp.gatsbyImageData with the GatsbyImage component and configuration options don't seem to have an effect on it.

Additional info

  • Gatsby: ^4.23.1
  • React: ^18.2.0
  • gatsby-source-craft: ^3.0.0
  • Craft version: Craft Pro 4.3.4
  • PHP version: 8.0.26
  • Database driver & version: PostgreSQL 14.6
  • Plugins & versions:
DigitalOcean Spaces Filesystem 2.0.0
Feed Me 5.0.4
Formie dev-craft-4
Gatsby Helper 2.0.1
Maps v4.0.3
Navigation 2.0.14
Postmark 3.0.0
Redactor 3.0.2
Scout 3.0.0
SEO v4.0.3
Super Table 3.0.5
Table Maker 4.0.3
Typed link field 2.1.5
@zjr zjr added the bug Something isn't working label Dec 5, 2022
@zjr
Copy link
Author

zjr commented Dec 5, 2022

PS I also reviewed this issue: #21 and updated my sourcingParams… this did help with some inconsistent build failures but not with the images. Here's my settings just in case it's helpful to anyone.

{
	resolve: `gatsby-source-craft`,
	options: {
		fragmentsDir: './src/fragments/craft',
		sourcingParams: {
			EntryInterface: {
				orderBy: '"slug"'
			},
			AssetInterface: {
				orderBy: '"title"'
			}
		}
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant