Model reads image files with the same name, UI always shows the first loaded image

Open 💬 1 comment Opened May 26, 2026 by zdu881

What version of the IDE extension are you using?

26.5519.32039 pre relase

What subscription do you have?

API only

Which IDE are you using?

VS code

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

When the model reads two different image files that have the same filename (e.g., both named diagram.png but located in different directories), the UI always displays the first loaded image instead of the correct one corresponding to the current context. Even after clearing cache or reloading, the old image persists

What steps can reproduce the bug?

Load image A named test.png from folder dir1/ – UI shows image A correctly.

Load image B also named test.png from folder dir1/ (as is the same dir1/test.png)

<img width="785" height="1059" alt="Image" src="https://github.com/user-attachments/assets/69f32501-79cb-47c6-9e40-544c188efb39" />

– UI still shows image A (the first one).

Refresh or reopen the model – the incorrect image remains.

Expected: UI should display image B.

What is the expected behavior?

<img width="1145" height="737" alt="Image" src="https://github.com/user-attachments/assets/5e03b921-eea6-4f16-b435-dcf316269861" />
The UI should display the image that corresponds to the most recently loaded file path, regardless of identical filenames. The model should differentiate images by their full path or a unique identifier, not just the basename.

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗