Custom GPT can't show base64 encoded image

I created an action that calls an API that returns an image in its body, as a base64 encodes string. When receiving the image this way, the GPT starts returning it as markdown text, but does so character by character and seemingly never finishes it. At some point it just stops halfway the base6 string.

I figured the code interpreter should be able to do it using PIL, but then gets stuck on the ‘too long’ base64 string that represents the image.

What approach should I take to show a base64 image coming from an agent/API?