{"record":{"id":"22d732d3c6560c6a","repo":"deepseek-ai/deepseek-harness","slug":"image-too-large","errorCode":"IMAGE_TOO_LARGE","errorMessage":"Image cannot be encoded within the configured normalized-image byte cap.","messagePattern":"Image cannot be encoded within the configured normalized-image byte cap\\.","errorType":"exception","errorClass":"AttachmentError","httpStatus":null,"severity":"error","filePath":"packages/attachment/attachment-local/src/normalization.ts","lineNumber":205,"sourceCode":"      const sizeScale = Math.sqrt(policy.maxBytes / encoded.smallest.data.byteLength) * 0.95\n      const scale = Math.min(MIN_SCALE_STEP, sizeScale)\n      const nextWidth = Math.max(1, Math.floor(width * scale))\n      const nextHeight = Math.max(1, Math.floor(height * scale))\n      width = nextWidth\n      height = nextHeight\n    }\n  } catch (error) {\n    if (error instanceof AttachmentError) throw error\n    const source = detected.mediaType === 'image/png' && detected.depth !== 'uchar'\n      ? `${detected.depth === 'ushort' ? '16-bit' : detected.depth} PNG`\n      : `${detected.depth} ${detected.mediaType.slice('image/'.length).toUpperCase()}`\n    throw new AttachmentError(\n      `The ${source} could not be converted to the normalized 8-bit sRGB form.`,\n      'ATTACHMENT_WRITE_FAILED',\n      { cause: error },\n    )\n  }\n  throw new AttachmentError('Image cannot be encoded within the configured normalized-image byte cap.', 'IMAGE_TOO_LARGE')\n}\n","sourceCodeStart":187,"sourceCodeEnd":207,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/attachment/attachment-local/src/normalization.ts#L187-L207","documentation":"Error \"Image cannot be encoded within the configured normalized-image byte cap.\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/attachment/attachment-local/src/normalization.ts:205 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the image resolution or quality, or raise the configured normalized-image byte cap."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}