Skip to content

Commit b177db9

Browse files
authored
fix(gatsby): support multiple instances of same variable in gatsbyImage placeholderUrl (#38626)
1 parent 5bc0992 commit b177db9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/gatsby-plugin-utils/src/polyfill-remote-file/placeholder-handler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ function generatePlaceholderUrl({
273273
const aspectRatio = originalWidth / originalHeight
274274

275275
return url
276-
.replace(`%width%`, String(width))
277-
.replace(`%height%`, Math.floor(width / aspectRatio).toString())
278-
.replace(`%quality%`, String(quality))
276+
.replaceAll(`%width%`, String(width))
277+
.replaceAll(`%height%`, Math.floor(width / aspectRatio).toString())
278+
.replaceAll(`%quality%`, String(quality))
279279
}

0 commit comments

Comments
 (0)