Bug found when trying to generate two versions of the same image in a graphql query #35054
Closed
2 tasks done
Labels
status: confirmed
Issue with steps to reproduce the bug that’s been verified by at least one reviewer.
topic: media
Related to gatsby-plugin-image, or general image/media processing topics
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
This is a bug I found while trying to produce two versions of the same image from a graphql repo. I used two graphql aliases to return the same image with different settings for
transformOptions: {duotone }
.I found that if all parameters in the graphql query are the same, except for the
transformOptions: { duotone }
settings, two different images are not generated. Rather the same image is displayed twice.In my case, I was able to bypass this bug by adding different
quality
settings to each of the query parameters. If I add quality settings to each image query, then the different images display correctly. I have commented out some alternative graphql queries in the index.js that demonstrate this fix.Reproduction Link
https://github.com/mrbjjackson/gatsby-plugin-image-transformOptions-bug
Steps to Reproduce
Expected Result
Two images with different duotone settings to be displayed.

Actual Result
The same image is displayed twice.

Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: