Skip to content

Commit e21a71d

Browse files
authored
chore(gatsby-transformer-sharp): Replace alpha warning for gatsbyImageData (#28123)
1 parent ab96f1e commit e21a71d

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

packages/gatsby-plugin-image/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ Because this no longer uses fragments to specify which fields to return, it inst
317317
- `BLURRED`: (default) a blurred, low resolution image, encoded as a base64 data URI
318318
- `TRACED_SVG`: a low-resolution traced SVG of the image.
319319
- `NONE`: no placeholder. Set "background" to use a fixed background color.
320-
- `DOMINANT_COLOR`: a solid color, calculated from the dominant color of the image. _Currently disabled until sharp is updated_
320+
- `DOMINANT_COLOR`: a solid color, calculated from the dominant color of the image.
321321
- `layout`: The layout for the image.
322322
- `FIXED:` A static image sized, that does not resize according to the screen width
323323
- `FLUID`: The image resizes to fit its container. Pass a "sizes" option if it isn't going to be the full width of the screen.

packages/gatsby-transformer-sharp/src/customize-schema.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ const fluidNodeType = ({
385385
}
386386
}
387387

388-
let warnedForAlpha = false
388+
let warnedForBeta = false
389389

390390
const imageNodeType = ({
391391
pathPrefix,
@@ -511,13 +511,12 @@ const imageNodeType = ({
511511
reporter.warn(`Please upgrade gatsby-plugin-sharp`)
512512
return null
513513
}
514-
if (!warnedForAlpha) {
514+
if (!warnedForBeta) {
515515
reporter.warn(
516516
stripIndent`
517-
You are using the alpha version of the \`gatsbyImageData\` sharp API, which is unstable and will change without notice.
518-
Please do not use it in production.`
517+
Thank you for trying the beta version of the \`gatsbyImageData\` API. Please provide feedback and report any issues at: https://github.com/gatsbyjs/gatsby/discussions/27950`
519518
)
520-
warnedForAlpha = true
519+
warnedForBeta = true
521520
}
522521
const imageData = await generateImageData({
523522
file,

0 commit comments

Comments
 (0)