diff --git a/packages/gatsby-plugin-utils/src/polyfill-remote-file/placeholder-handler.ts b/packages/gatsby-plugin-utils/src/polyfill-remote-file/placeholder-handler.ts index c97cdd2863604..df769271ea23c 100644 --- a/packages/gatsby-plugin-utils/src/polyfill-remote-file/placeholder-handler.ts +++ b/packages/gatsby-plugin-utils/src/polyfill-remote-file/placeholder-handler.ts @@ -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)) }