Issue with Editor crashing when encountering .ico favicon file #7046

Open
opened 2026-02-16 18:05:59 -05:00 by yindo · 1 comment
Owner

Originally created by @Frostist on GitHub (Jan 21, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

I added images to my next.js public dir and the agent worked fine, but the moment I added a favicon.ico file and asked it to make changes to the codebase to include the favicon, I just gave me errors like this one:

messages.0.content.13.image.source.base64.media_type: Input should be 'image/jpeg', 'image/png', 'image/gif' or 'image/webp'

Plugins

NA

OpenCode version

Version 1.1.28 (1.1.28)

Steps to reproduce

Include a favicon.ico file in your dir and ask the agent to add it to code.

Screenshot and/or share link

Image

Operating System

macOS 26.2

Terminal

Using the OpenCode IDE

Originally created by @Frostist on GitHub (Jan 21, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description I added images to my next.js public dir and the agent worked fine, but the moment I added a favicon.ico file and asked it to make changes to the codebase to include the favicon, I just gave me errors like this one: messages.0.content.13.image.source.base64.media_type: Input should be 'image/jpeg', 'image/png', 'image/gif' or 'image/webp' ### Plugins NA ### OpenCode version Version 1.1.28 (1.1.28) ### Steps to reproduce Include a favicon.ico file in your dir and ask the agent to add it to code. ### Screenshot and/or share link <img width="782" height="613" alt="Image" src="https://github.com/user-attachments/assets/88df9c1a-6883-4591-becc-cdec27d34f50" /> ### Operating System macOS 26.2 ### Terminal Using the OpenCode IDE
yindo added the bug label 2026-02-16 18:05:59 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 21, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9210: Reading .fbs files fails with "Unsupported image mime type: image/vnd.fastbidsheet" — similar issue where non-standard image file types are being treated as images and rejected
  • #4052: SVG File Paths Rejected — related problem where non-standard image formats (.svg) are rejected with the same media type validation error
  • #9512: Trying to read an invalid image file bricks the session — when invalid image files are encountered, the session becomes unrecoverable

All these issues stem from the same root cause: OpenCode attempts to process certain file types as images when they shouldn't be, resulting in media type validation errors ('image/jpeg', 'image/png', 'image/gif' or 'image/webp' are the only supported formats).

Feel free to ignore if your specific case differs from these existing issues.

@github-actions[bot] commented on GitHub (Jan 21, 2026): This issue might be a duplicate of existing issues. Please check: - #9210: Reading .fbs files fails with "Unsupported image mime type: image/vnd.fastbidsheet" — similar issue where non-standard image file types are being treated as images and rejected - #4052: SVG File Paths Rejected — related problem where non-standard image formats (.svg) are rejected with the same media type validation error - #9512: Trying to read an invalid image file bricks the session — when invalid image files are encountered, the session becomes unrecoverable All these issues stem from the same root cause: OpenCode attempts to process certain file types as images when they shouldn't be, resulting in media type validation errors ('image/jpeg', 'image/png', 'image/gif' or 'image/webp' are the only supported formats). Feel free to ignore if your specific case differs from these existing issues.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7046