{"record":{"id":"d1476e4065105bb4","repo":"Significant-Gravitas/AutoGPT","slug":"logo-too-small-minimum-logo-min-size-x-logo-min","errorCode":null,"errorMessage":"Logo too small. Minimum {LOGO_MIN_SIZE}x{LOGO_MIN_SIZE}. Got {width}x{height}","messagePattern":"Logo too small\\. Minimum (.+?)x(.+?)\\. Got (.+?)x(.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/oauth.py","lineNumber":745,"sourceCode":"            detail=(\n                \"File too large. \"\n                f\"Maximum size is {LOGO_MAX_FILE_SIZE // 1024 // 1024}MB\"\n            ),\n        )\n\n    # Validate image dimensions\n    try:\n        image = Image.open(io.BytesIO(file_bytes))\n        width, height = image.size\n\n        if width != height:\n            raise HTTPException(\n                status_code=status.HTTP_400_BAD_REQUEST,\n                detail=f\"Logo must be square. Got {width}x{height}\",\n            )\n\n        if width < LOGO_MIN_SIZE:\n            raise HTTPException(\n                status_code=status.HTTP_400_BAD_REQUEST,\n                detail=f\"Logo too small. Minimum {LOGO_MIN_SIZE}x{LOGO_MIN_SIZE}. \"\n                f\"Got {width}x{height}\",\n            )\n\n        if width > LOGO_MAX_SIZE:\n            raise HTTPException(\n                status_code=status.HTTP_400_BAD_REQUEST,\n                detail=f\"Logo too large. Maximum {LOGO_MAX_SIZE}x{LOGO_MAX_SIZE}. \"\n                f\"Got {width}x{height}\",\n            )\n    except HTTPException:\n        raise\n    except Exception as e:\n        logger.error(f\"Error validating logo image: {e}\")\n        raise HTTPException(\n            status_code=status.HTTP_400_BAD_REQUEST,\n            detail=\"Invalid image file\",","sourceCodeStart":727,"sourceCodeEnd":763,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/oauth.py#L727-L763","documentation":"Returned (400) when the square image is smaller than LOGO_MIN_SIZE (512px). Small sources would look blurry at display sizes, so the API enforces a minimum resolution.","triggerScenarios":"Uploading a 256x256 or 128x128 icon (typical favicon-sized assets).","commonSituations":"Using favicon.ico-adjacent exports; grabbing a small avatar/thumbnail version of the logo instead of the original; legacy brand assets created at low resolution.","solutions":["Export the logo at 512x512 or larger (1024x1024 recommended)","Get the original high-resolution asset from the design source instead of a downscaled copy","Only as a last resort, upscale with a quality scaler — prefer a true high-res source"],"exampleFix":"# design tool export settings\n# before: 256x256 PNG\n# after: 1024x1024 PNG (export scale 4x or original artboard)","handlingStrategy":"validation","validationCode":"MIN = 512\nif min(Image.open(path).size) < MIN:\n    raise ValueError(\"export at 512px or larger\")","typeGuard":"def meets_min_size(path: str, minimum: int = 512) -> bool:\n    return min(Image.open(path).size) >= minimum","tryCatchPattern":"if resp.status_code == 400 and \"too small\" in resp.text:\n        fetch_high_res_source_and_retry()","preventionTips":["Always export from the original design source, not thumbnails","Set export presets to 1024x1024","Reject tiny assets in the frontend picker"],"tags":["validation","http-400","image","file-upload"],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}