Skip to content

Commit 592d3d1

Browse files
authored
fix(gatsby-plugin-sharp): fix image url decoding for lazy images (#28576)
1 parent 1b97f5f commit 592d3d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/gatsby-plugin-sharp/src/gatsby-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ exports.onCreateDevServer = async ({ app, cache, reporter }) => {
6262
finishProgressBar()
6363

6464
app.use(async (req, res, next) => {
65-
const decodedURI = decodeURI(req.url)
65+
const decodedURI = decodeURIComponent(req.path)
6666
const pathOnDisk = path.resolve(path.join(`./public/`, decodedURI))
6767

6868
if (await pathExists(pathOnDisk)) {

0 commit comments

Comments
 (0)