Skip to content

Commit

Permalink
fix(gatsby): support multiple instances of same variable in gatsbyIma…
Browse files Browse the repository at this point in the history
…ge placeholderUrl (#38626)

(cherry picked from commit b177db9)
  • Loading branch information
cunhacf authored and pieh committed Oct 20, 2023
1 parent 8302bc8 commit a473264
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ function generatePlaceholderUrl({
const aspectRatio = originalWidth / originalHeight

return url
.replace(`%width%`, String(width))
.replace(`%height%`, Math.floor(width / aspectRatio).toString())
.replace(`%quality%`, String(quality))
.replaceAll(`%width%`, String(width))
.replaceAll(`%height%`, Math.floor(width / aspectRatio).toString())
.replaceAll(`%quality%`, String(quality))
}

0 comments on commit a473264

Please sign in to comment.