From 592d3d1914413435a9a202cdfc2cd4ac84486a71 Mon Sep 17 00:00:00 2001 From: Vladimir Razuvaev Date: Fri, 11 Dec 2020 03:48:13 +0700 Subject: [PATCH] fix(gatsby-plugin-sharp): fix image url decoding for lazy images (#28576) --- packages/gatsby-plugin-sharp/src/gatsby-node.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby-plugin-sharp/src/gatsby-node.js b/packages/gatsby-plugin-sharp/src/gatsby-node.js index 33c3f5aacbefa..b34d4736422ec 100644 --- a/packages/gatsby-plugin-sharp/src/gatsby-node.js +++ b/packages/gatsby-plugin-sharp/src/gatsby-node.js @@ -62,7 +62,7 @@ exports.onCreateDevServer = async ({ app, cache, reporter }) => { finishProgressBar() app.use(async (req, res, next) => { - const decodedURI = decodeURI(req.url) + const decodedURI = decodeURIComponent(req.path) const pathOnDisk = path.resolve(path.join(`./public/`, decodedURI)) if (await pathExists(pathOnDisk)) {