mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #19750] issue: Image Edit does not distinguish between User and Assistant images #34512
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @eml-henn on GitHub (Dec 4, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/19750
Check Existing Issues
Installation Method
Docker
Open WebUI Version
6.40
Ollama Version (if applicable)
No response
Operating System
Debian
Browser (if applicable)
Firefox
Confirmation
README.md.Expected Behavior
User prompts for image generation or uploads an image and prompts for an edit.
Assistant generates an image
User uploads an image as a reference to edit the previously generated image.
Assistant generates a new image based on the previously generated image AND the new reference image
Actual Behavior
User prompts for image generation or uploads an image and prompts for an edit.
Assistant generates an image
User uploads an image as a reference to edit the previously generated image.
Assistant generates a new image based ONLY on the new reference image
Steps to Reproduce
tested with gpt-image-1 and nano banana.
turn on image generation and image editing
create a new chat
turn on the image creation extension
input your prompt, or upload reference images and input your prompt
generate an image
upload a reference image and input a prompt to edit
Logs & Screenshots
Additional Information
The issue is with the get last images function in middleware.py
def get_last_images(message_list):
images = []
for message in reversed(message_list):
images_flag = False
for file in message.get("files", []):
if file.get("type") == "image":
images.append(file.get("url"))
images_flag = True
as soon as it parses the most recent user message with one or more rerefence images, it stops.
I am testing with a minimal fix which runs a function for get_last_user_images and a separate get_last_assistang_images. The rest of the logic would otherwise remain the same - if images are found, they are sent to the image edit endpoint. If this method sounds acceptable, I´d go on with testing and send a PR.
@owui-terminator[bot] commented on GitHub (Dec 4, 2025):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
#18995 issue: image generation and edition doesn’t work on temporary chats
by futureshield • Nov 06, 2025 •
bug#19393 issue: shared chats with images - images won't show
by Classic298 • Nov 23, 2025 •
bug#19702 issue: Image generation tool causes inconsistency between model response and actual generated image
by manwallet • Dec 03, 2025 •
bug#19187 issue: Image generation menu gone.
by calebrio02 • Nov 14, 2025 •
bug#19563 issue:
by naruto7g • Nov 28, 2025 •
bugShow 5 more related issues
#19019 issue: Image generation doesn't work with OpenRouter
by vladkvit • Nov 07, 2025 •
bug#19438 issue: Icon loading regression
by JoelShepard • Nov 24, 2025 •
bug#19451 issue: Images with gpt-image-1 ERROR: No connection adapters were found
by 3keyallen3 • Nov 25, 2025 •
bug#19215 issue:Server Failed opening Admin > Settings > Images Panel
by fordinator • Nov 16, 2025 •
bug#19284 issue: Need button in GUI to disable image edit
by ALIENvsROBOT • Nov 19, 2025 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
@silentoplayz commented on GitHub (Dec 6, 2025):
This issue has been reproduced internally. so I've added the
confirmed issuelabel.@Classic298 commented on GitHub (Dec 11, 2025):
Fixed in dev