Skip to content

Commit 02e925a

Browse files
gatsbybotcunhacf
andauthored
fix(gatsby): support multiple instances of same variable in gatsbyImage placeholderUrl (#38626) (#38647)
(cherry picked from commit b177db9) Co-authored-by: Carlos Fernandes Cunha <[email protected]>
1 parent 8302bc8 commit 02e925a

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)