Image rendering from assistant API response

I am using gpt-4-1106-preview model and i am getting image file_id in response from assistant.
with the help of that file_id i am fetching file from open ai


This is my backend code


This is my frontend code

With this code i can render image when i paste same url in browser

but when i wrap the same url in src attribute of img, i am getting issue in rendering

Can anyone help me to render the image on frontend with img tag

I would try a sleep to see if it takes time for the URL to be ready from code interpreter. A big wait just to test.

Then run the browser in developer tools network logging mode and see what the code status is on the URL retrieval - if it does get performed.