gatsby-uc / gatsby-uc/plugins

bug(gatsby-source-strapi): Image processing breaks when using relation field in Dynamic Zone

Open
#336 2 comments 0 reactions 0 assignees View on GitHub
needs-reproduction
Dominant language
JavaScript
Stars
57
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Hello,

I understand there was a previous issue where gatsby image processing was not occurring when using images in Dynamic Zone. This bug was fixed in this PR https://github.com/strapi/gatsby-source-strapi/pull/266.

However, I believe I have found a separate instance where gatsby sharp image processing breaks. I have a collection type called PageTemplate. This collection has a dynamic zone called "sections" which contains a few relations to other collection types. For example, the statsModule (labeled Stats in the Dynamic Zone) is a relation field that contains some images. However, when I query the PageTemplate, I cannot access the localFile field for the images within the Stats section.

**PageTemplate setup in strapi**
![Screen Shot 2022-07-20 at 2 06 03 PM](https://user-images.githubusercontent.com/16313738/180082359-af5ee980-dba2-4e43-82c7-c003e47a8ddb.png)

**PageTemplate query (localFile not found)**
![Screen Shot 2022-07-20 at 2 05 41 PM](https://user-images.githubusercontent.com/16313738/180082494-eb738b2f-0b42-421a-a0b0-3add53314ff9.png)

I am running on gatsby-source-strapi v 2.0.0 and strapi 4.1.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.