Skip to content

fix: Resolve the fix for intermittent issue image not showing in final answer and also fixed the Image is not getting rendered in WAF deployment#1063

Merged
Roopan-Microsoft merged 1 commit into
microsoft:devfrom
Dhruvkumar1-Microsoft:psl-WafImageIssue
Jun 24, 2026
Merged

fix: Resolve the fix for intermittent issue image not showing in final answer and also fixed the Image is not getting rendered in WAF deployment#1063
Roopan-Microsoft merged 1 commit into
microsoft:devfrom
Dhruvkumar1-Microsoft:psl-WafImageIssue

Conversation

@Dhruvkumar1-Microsoft

Copy link
Copy Markdown

Purpose

This pull request refactors how image URLs are handled and delivered throughout the backend and frontend, standardizing on relative backend proxy paths (e.g., /api/v4/images/{blob}) instead of absolute URLs or SAS links. This change improves compatibility across different deployment scenarios (public backend and WAF/private networking) and simplifies frontend logic for resolving image URLs. The update also ensures that markdown rendering in the UI consistently transforms image URLs for correct API routing.

Backend changes:

  • Standardized image URL generation to return relative backend proxy paths (/api/v4/images/{blob}), removing logic for generating absolute URLs or SAS tokens. This ensures browsers always fetch images through the backend proxy, supporting both public and private deployments. (Fe9f3741L46, Fe9f3741L73, F09d754cL177)
  • Updated the image URL regex in orchestration_manager.py to recognize both absolute and bare relative backend image paths, improving image detection in markdown. (Fa2ec1afL37)

Frontend changes:

  • Added a new resolveApiAssetUrl utility in config.tsx to convert relative backend image paths to fully-qualified URLs based on the configured API origin. (F49b1da0L85)
  • Updated all ReactMarkdown usages (in Chat.tsx, StreamingAgentMessage.tsx, and StreamingBufferMessage.tsx) to use resolveApiAssetUrl for transforming image URLs, ensuring images render correctly regardless of deployment. (F7ce3d99L9, F7ce3d99L183, F6e593a9L8, F6e593a9L206, F01ed937L7, F01ed937L165, F01ed937L219)

Documentation/Prompting:

  • Clarified prompt instructions to always embed images using markdown image syntax and never as bare URLs or plain links, referencing the new standardized backend image path. (F55b4be3L114)

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

…wer and also fixed the Image is not getting rendered in WAF deployment
@Dhruvkumar1-Microsoft

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@Roopan-Microsoft Roopan-Microsoft merged commit a2b8f5a into microsoft:dev Jun 24, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants