{"record":{"id":"cb217350c9c6d8ab","repo":"openai/codex","slug":"image-representation-is-too-large-size-bytes","errorCode":null,"errorMessage":"image {representation} is too large ({size} bytes; max {max} bytes)","messagePattern":"image (.+?) is too large \\((.+?) bytes; max (.+?) bytes\\)","errorType":"validation","errorClass":"ImageProcessingError","httpStatus":null,"severity":"error","filePath":"codex-rs/utils/image/src/error.rs","lineNumber":30,"sourceCode":"        source: std::io::Error,\n    },\n    #[error(\"failed to decode image at {path}: {source}\")]\n    Decode {\n        path: PathBuf,\n        #[source]\n        source: image::ImageError,\n    },\n    #[error(\"failed to encode image as {format:?}: {source}\")]\n    Encode {\n        format: ImageFormat,\n        #[source]\n        source: image::ImageError,\n    },\n    #[error(\"unsupported image `{mime}`\")]\n    UnsupportedImageFormat { mime: String },\n    #[error(\"invalid image data URL: {reason}\")]\n    InvalidDataUrl { reason: String },\n    #[error(\"image {representation} is too large ({size} bytes; max {max} bytes)\")]\n    ImageTooLarge {\n        representation: &'static str,\n        size: usize,\n        max: usize,\n    },\n}\n\nimpl ImageProcessingError {\n    pub fn decode_error(path: &std::path::Path, source: image::ImageError) -> Self {\n        if matches!(source, ImageError::Decoding(_)) {\n            return ImageProcessingError::Decode {\n                path: path.to_path_buf(),\n                source,\n            };\n        }\n\n        let mime = mime_guess::from_path(path)\n            .first()","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/utils/image/src/error.rs#L12-L48","documentation":"Error \"image {representation} is too large ({size} bytes; max {max} bytes)\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/utils/image/src/error.rs:30 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}