Currently revealed opacity is configured as 1 and unrevealed as 0 and there's no way to override this. I would like to use 0.8 and a backgroundColor of #000 to darken the image a bit.
Something like this, would be ideal:
<Img revealedStyle={{opacity: 0.8}} /> // Having revealedStyle default to {opacity:1}
I can PR if requested.
Hey @tkbky! We won't be adding prop like that to gatsby-image as the usecase you presented is quite niche and in our opinion doesn't warrant adding more surface area to gatsby-image.
For cases like that I would recommend vendoring gatsby-image (copy code from https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-image/src/index.js to your project and adjust it locally and use that instead of gatsby-image).
@pieh You have mentioned the wrong person. 馃槵
@tkvw FYI
+1 to @tkvw's request, I don't think darkening an image should be considered a niche case!!
Most helpful comment
+1 to @tkvw's request, I don't think darkening an image should be considered a niche case!!