Fixed Load Image preview not displaying some files (issue #1158)

This commit is contained in:
MoonRide303 2023-09-08 08:43:17 +02:00
parent 326577d04c
commit ff962098fd
1 changed files with 1 additions and 1 deletions

View File

@ -335,7 +335,7 @@ export const ComfyWidgets = {
subfolder = name.substring(0, folder_separator);
name = name.substring(folder_separator + 1);
}
img.src = api.apiURL(`/view?filename=${name}&type=input&subfolder=${subfolder}${app.getPreviewFormatParam()}`);
img.src = api.apiURL(`/view?filename=${encodeURIComponent(name)}&type=input&subfolder=${subfolder}${app.getPreviewFormatParam()}`);
node.setSizeForImage?.();
}