mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-22 20:30:25 +08:00
Update imageFeed.js
Only output images, not preview images
This commit is contained in:
parent
5b4879b966
commit
f4b593c44a
@ -68,21 +68,23 @@ app.registerExtension({
|
|||||||
api.addEventListener("executed", ({ detail }) => {
|
api.addEventListener("executed", ({ detail }) => {
|
||||||
if (detail?.output?.images) {
|
if (detail?.output?.images) {
|
||||||
for (const src of detail.output.images) {
|
for (const src of detail.output.images) {
|
||||||
const img = document.createElement("img");
|
if (src.type == 'output') { //Only show output images, not preview images
|
||||||
const a = document.createElement("a");
|
const img = document.createElement("img");
|
||||||
a.href = `/view?filename=${encodeURIComponent(src.filename)}&type=${src.type}&subfolder=${encodeURIComponent(
|
const a = document.createElement("a");
|
||||||
src.subfolder
|
a.href = `/view?filename=${encodeURIComponent(src.filename)}&type=${src.type}&subfolder=${encodeURIComponent(
|
||||||
)}`;
|
src.subfolder
|
||||||
a.target = "_blank";
|
)}`;
|
||||||
Object.assign(img.style, {
|
a.target = "_blank";
|
||||||
height: "120px",
|
Object.assign(img.style, {
|
||||||
width: "120px",
|
height: "120px",
|
||||||
objectFit: "cover",
|
width: "120px",
|
||||||
});
|
objectFit: "cover",
|
||||||
|
});
|
||||||
|
|
||||||
img.src = a.href;
|
img.src = a.href;
|
||||||
a.append(img);
|
a.append(img);
|
||||||
imageList.prepend(a);
|
imageList.prepend(a);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user