> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fucksornot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Image

Retrieve the full image for an upload.

## Request

```bash theme={null}
curl https://fucksornot.com/api/image/550e8400-e29b-41d4-a716-446655440000
```

## Response

Returns binary image data with appropriate headers:

| Header              | Value                                 | Description                                               |
| ------------------- | ------------------------------------- | --------------------------------------------------------- |
| `Content-Type`      | `image/webp`, `image/jpeg`, etc.      | Image format                                              |
| `Cache-Control`     | `public, max-age=31536000, immutable` | 1 year, immutable cache for public images                 |
| `CDN-Cache-Control` | `public, max-age=31536000, immutable` | 1 year, immutable cache at the CDN edge for public images |
| `ETag`              | Content hash                          | For cache validation                                      |

## Content Types

| Format | Content-Type |
| ------ | ------------ |
| WebP   | `image/webp` |
| JPEG   | `image/jpeg` |
| PNG    | `image/png`  |
| GIF    | `image/gif`  |

## Caching

Images are aggressively cached:

* **Public images**: 1 year, immutable cache (`public, max-age=31536000, immutable`), set on both the `Cache-Control` and `CDN-Cache-Control` headers
* **Private images**: No cache (`private, no-store, must-revalidate`)

Use the `ETag` header for conditional requests:

```bash theme={null}
curl https://fucksornot.com/api/image/550e8400-e29b-41d4-a716-446655440000 \
  -H "If-None-Match: \"abc123\""
```

Returns `304 Not Modified` if unchanged.

## Access Control

* **Public images**: Accessible to everyone
* **Private images**: Only accessible to owner and admins

Private images return `404 Not Found` if accessed without authorization.

## Direct Image URL

For embedding in HTML:

```html theme={null}
<img src="https://fucksornot.com/api/image/550e8400-e29b-41d4-a716-446655440000"
     alt="Upload image" />
```

## Errors

| Status | Description                      |
| ------ | -------------------------------- |
| 304    | Not Modified (cached)            |
| 404    | Image not found or access denied |
