zed-industries/zed · error

Failed to convert image

Error message

Failed to convert image

What it means

Error "Failed to convert image" thrown in zed-industries/zed.

Source

Thrown at crates/agent_ui/src/mention_set.rs:420

        if is_raster_image_path(&abs_path) {
            if !supports_images {
                return Task::ready(Err(anyhow!("This model does not support images yet")));
            }
            let task = project.update(cx, |project, cx| project.open_image(project_path, cx));
            return cx.spawn(async move |_, cx| {
                let image = task.await?;
                let image = image.update(cx, |image, _| image.image.clone());
                let image = cx
                    .update(|cx| LanguageModelImage::from_image(image, cx))
                    .await;
                if let Some(image) = image {
                    Ok(Mention::Image(MentionImage {
                        data: image.source,
                        format: LanguageModelImage::FORMAT,
                    }))
                } else {
                    Err(anyhow!("Failed to convert image"))
                }
            });
        }

        let buffer = project.update(cx, |project, cx| project.open_buffer(project_path, cx));
        cx.spawn(async move |_, cx| {
            let buffer = match buffer.await {
                Ok(buffer) => buffer,
                Err(_error) => {
                    return Ok(Mention::Link);
                }
            };
            let buffer_content = outline::get_buffer_content_or_outline(
                buffer.clone(),
                Some(&abs_path.to_string_lossy()),
                &cx,
            )
            .await?;

View on GitHub (pinned to bc538def45)

When it happens

Trigger: Thrown at crates/agent_ui/src/mention_set.rs:420 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16). Data as JSON: /api/errors/1e5f9995d2c33840. Report an issue: GitHub.