menu

WPGraphQL

Free Open Source WordPress plugin that adds an extendable GraphQL Schema and API to your WordPress site

Channels
Team

Filter featuredImage by size name

September 22, 2019 at 6:40pm

Filter featuredImage by size name

September 22, 2019 at 6:40pm
Hey all, new to wpgraphql but loving it so far.
Hoping someone can help me with this. I've got an homepage that displays posts 3 different ways, two of which use a featured image.
How can I tell my component which featured image size to use? Here's my query:
wpgraphql { posts { nodes { featuredImage { id mediaItemId mediaDetails { sizes { name sourceUrl } } } } } }
Ultimately I want to get the url of a specific size. Thoughts?
Thanks!
No messages yet