Significant-Gravitas/AutoGPT · error · HTTPException

Logo too small. Minimum {LOGO_MIN_SIZE}x{LOGO_MIN_SIZE}. Got

Error message

Logo too small. Minimum {LOGO_MIN_SIZE}x{LOGO_MIN_SIZE}. Got {width}x{height}

What it means

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.

Source

Thrown at autogpt_platform/backend/backend/api/features/oauth.py:745

            detail=(
                "File too large. "
                f"Maximum size is {LOGO_MAX_FILE_SIZE // 1024 // 1024}MB"
            ),
        )

    # Validate image dimensions
    try:
        image = Image.open(io.BytesIO(file_bytes))
        width, height = image.size

        if width != height:
            raise HTTPException(
                status_code=status.HTTP_400_BAD_REQUEST,
                detail=f"Logo must be square. Got {width}x{height}",
            )

        if width < LOGO_MIN_SIZE:
            raise HTTPException(
                status_code=status.HTTP_400_BAD_REQUEST,
                detail=f"Logo too small. Minimum {LOGO_MIN_SIZE}x{LOGO_MIN_SIZE}. "
                f"Got {width}x{height}",
            )

        if width > LOGO_MAX_SIZE:
            raise HTTPException(
                status_code=status.HTTP_400_BAD_REQUEST,
                detail=f"Logo too large. Maximum {LOGO_MAX_SIZE}x{LOGO_MAX_SIZE}. "
                f"Got {width}x{height}",
            )
    except HTTPException:
        raise
    except Exception as e:
        logger.error(f"Error validating logo image: {e}")
        raise HTTPException(
            status_code=status.HTTP_400_BAD_REQUEST,
            detail="Invalid image file",

View on GitHub (pinned to 9c8bb5550f)

Solutions

  1. Export the logo at 512x512 or larger (1024x1024 recommended)
  2. Get the original high-resolution asset from the design source instead of a downscaled copy
  3. Only as a last resort, upscale with a quality scaler — prefer a true high-res source

Example fix

# design tool export settings
# before: 256x256 PNG
# after: 1024x1024 PNG (export scale 4x or original artboard)
Defensive patterns

Strategy: validation

Validate before calling

MIN = 512
if min(Image.open(path).size) < MIN:
    raise ValueError("export at 512px or larger")

Type guard

def meets_min_size(path: str, minimum: int = 512) -> bool:
    return min(Image.open(path).size) >= minimum

Try / catch

if resp.status_code == 400 and "too small" in resp.text:
        fetch_high_res_source_and_retry()

Prevention

When it happens

Trigger: Uploading a 256x256 or 128x128 icon (typical favicon-sized assets).

Common situations: 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.

Related errors


AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14). Data as JSON: /api/errors/d1476e4065105bb4. Report an issue: GitHub.