datocms / gatsby-source-datocms

Official GatsbyJS source plugin to pull content from DatoCMS
MIT License
140 stars 51 forks source link

Imgix duotone query returns incorrectly formatted string #159

Closed claygiffin closed 3 years ago

claygiffin commented 3 years ago

According to the imgix docs, duotone queries should follow the format duotone={color1},{color2}

When trying to query gatsbyImageData or an image url with a duotone filter, the resulting string is formatted incorrectly. Instead of having the comma as part of the string, the result converts it to hexadecimal.

Input

image {
    url(imgixParams: {duotone: "FFF,000"})
}

Current output

"url": "https://www.datocms-assets.com/example.jpg?auto=format&duotone=FFF%2C%20000"

Desired output

"url": "https://www.datocms-assets.com/example.jpg?auto=format&duotone=FFF,000"
claygiffin commented 3 years ago

Closed. I realized that I had an extra space in my string between the two color values.