Expected a base64-encoded data URL with an image MIME type
Open 💬 17 comments Opened Apr 2, 2026 by johnthompson-pco
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
Suddenly started getting this error.
{ "type": "error", "error": { "type": "invalid_request_error", "code": "invalid_value", "message": "Invalid 'input[107].content[2].image_url'. Expected a base64-encoded data URL with an image MIME type (e.g. 'data:image/png;base64,aW1nIGJ5dGVzIGhlcmU='), but got empty base64-encoded bytes.", "param": "input[107].content[2].image_url" }, "status": 400 }
Prompt had an image.png attached (see attached) - a screenshot as usual.
Tried same prompt without image.png attached, same error.
Exit Codex and restart.
Same prompt (no image), same error.
<img width="2184" height="1495" alt="Image" src="https://github.com/user-attachments/assets/f2c7bbc9-bddd-4d71-a3fd-80e4c00e8c50" />
17 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
not a duplicate... it seems 🤷♂️
Codex 26.325.1654
GPT 5.4 Extra High, local
Subscription Business
Win11
Intel
To confirm, are you using the Codex app?
If you're able to repro, please use
/feedbackto upload your logs and session details, then post the thread ID here.Hi! I'm getting the same issues here as well. Is there any way I could fix it?
Also getting it after pasting an image from the clipboard synced from my phone (iPhone, HEIC encoded file was copied). Cannot continue the thread
Same issue for me. I pasted form my clipboard and it stopped working.
I was able to reproduce this bug. The trigger is copy/pasting content from a CSV editor like excel. It completely bricks the instance.
If you're on macOS and hitting clipboard image issues, clipaste may help. It normalizes the screenshot clipboard to include proper PNG data + file URL, which fixes format mismatches that cause "Expected a base64-encoded data URL" errors.
Is there a fix for this issue? I am experiencing this issue on one of my project on Codex. I am kind of block. I cant even summarize and create another project with my existing project
same issue for me. tried adding from the app, copy paste, drag and drop. just doesnt work.
as a workaround, I generated based64 of the image and pasted that.
``
base64 -I image.png``Same here, it used to work in the past (copying screenshot from phone and pasting to Codex).
Same issue!
Same issue, fixed it with a restart and let codex in a new context fix the old brocken context.
@etraut-openai
I can reproduce what looks like the same issue in Codex App on macOS with a spreadsheet paste flow.
Environment:
Steps:
.xlsxfile in Numbers.Actual behavior:
The copied row appears to be treated as an image/PNG attachment instead of text/table data, and the request fails with:
Expected behavior:
For spreadsheet cell/range paste, Codex App should prefer the clipboard's text/table representation over image-like representations. A copied Numbers row has useful text/TSV clipboard data, so pasting it into the composer should insert the cell values rather than attach an image. If an image representation is used, empty image payloads should be rejected before sending.
I uploaded diagnostics via
/feedbackfor thread ID:019dbfc1-90bd-7910-9ea6-fcc2590f14d7.Additional impact: after the initial failed paste, the affected thread continues to fail even when I send a new plain-text message without pasting anything. The later request fails with the same error at a previous history item, e.g.
input[590].content[2].image_url, which makes the thread effectively unusable until the malformed empty image item is removed or the thread is rolled back.Open a new a chat ~ give codex the session ID and tell him to remove the broken image ~ this happens cause your image is broken restart and you doine :)
You dont need to restard codex ~ afte codex gives you the ok ~ ARCHIEVE THE CHAT and restore it will do the trick
same issue, typically occur when copy and pasta a excel or photo directly into the chat box (and the entire chat cannot proceed afterwards), however, if adding the pictures as documents it works, so I guess it is some compatibility issues