fix: url encoding

This commit is contained in:
Cory Dransfeldt 2024-03-17 14:21:46 -07:00
parent 283a15d083
commit 2bf1fbeaee
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View file

@ -29,7 +29,7 @@ export const img = async (
filenameFormat: (id, src, width, format, options) => {
const extension = path.extname(src);
const name = path.basename(src, extension);
return `${name}-${width}w.${format}`;
return `${encodeURIComponent(name)}-${width}w.${format}`;
},
});