---
title: "Returns a small sample image in the requested `format`."
url: "https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8/operations/image_handler"
---

> Full API specification: https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8.md

# Returns a small sample image in the requested `format`.

`GET` `/image/{format}`

Operation ID: `image_handler`

Supported: `png`, `jpeg` (alias `jpg`), `svg`, `webp` — any other value returns 400. Each returns a tiny fixed image with the matching `Content-Type`, as a controllable upstream for testing gateway handling of binary/image bodies.

## Path parameters

- `format` (string, required) - Image format: png, jpeg, svg, or webp

## Responses

- `200` - A sample image in the requested format
- `400` - Unsupported image format

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: rucho
  version: 1.6.0
servers:
  - url: https://rucho.org
    description: Production (EKS us-east-2, behind Kong)
paths:
  /image/{format}:
    get:
      tags:
        - crate::routes::image
      summary: Returns a small sample image in the requested `format`.
      description: >-
        Supported: `png`, `jpeg` (alias `jpg`), `svg`, `webp` — any other value

        returns 400. Each returns a tiny fixed image with the matching

        `Content-Type`, as a controllable upstream for testing gateway handling
        of

        binary/image bodies.
      operationId: image_handler
      parameters:
        - name: format
          in: path
          description: "Image format: png, jpeg, svg, or webp"
          required: true
          schema:
            type: string
      responses:
        "200":
          description: A sample image in the requested format
        "400":
          description: Unsupported image format
```
