{"record":{"id":"c7c0988da0c730ca","repo":"zed-industries/zed","slug":"unsupported-image-format-format","errorCode":null,"errorMessage":"unsupported image format {format:?}","messagePattern":"unsupported image format (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/repl/src/outputs/image.rs","lineNumber":58,"sourceCode":"        for pixel in data.chunks_exact_mut(4) {\n            pixel.swap(0, 2);\n        }\n\n        let height = data.height();\n        let width = data.width();\n\n        let gpui_image_data = RenderImage::new(vec![image::Frame::new(data)]);\n\n        let format = match format {\n            image::ImageFormat::Png => ImageFormat::Png,\n            image::ImageFormat::Jpeg => ImageFormat::Jpeg,\n            image::ImageFormat::Gif => ImageFormat::Gif,\n            image::ImageFormat::WebP => ImageFormat::Webp,\n            image::ImageFormat::Tiff => ImageFormat::Tiff,\n            image::ImageFormat::Bmp => ImageFormat::Bmp,\n            image::ImageFormat::Ico => ImageFormat::Ico,\n            format => {\n                anyhow::bail!(\"unsupported image format {format:?}\");\n            }\n        };\n\n        // Convert back to a GPUI image for use with the clipboard\n        let clipboard_image = Arc::new(Image::from_bytes(format, bytes));\n\n        Ok(ImageView {\n            clipboard_image,\n            height,\n            width,\n            image: Arc::new(gpui_image_data),\n        })\n    }\n\n    fn scaled_size(\n        &self,\n        line_height: Pixels,\n        max_width: Option<Pixels>,","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/repl/src/outputs/image.rs#L40-L76","documentation":"Raised in the image Output::from conversion when the decoded image's format enum value does not map to one of the GPUI-supported formats (Png, Jpeg, Gif, WebP, Tiff, Bmp, ...). The unrecognized format discriminant is the fault; the MIME type advertised by the kernel does not match a format Zed can render.","triggerScenarios":"Thrown at crates/repl/src/outputs/image.rs:58 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure the kernel to emit PNG or JPEG images (e.g. matplotlib `%%config InlineBackend.figure_formats = ['png']`)","Avoid output formats like SVG/BMP from the notebook","Convert or re-render the output in a supported format"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}