DEV Community

Cover image for I built a Serverless Image Host with Vue 3 & Cloudflare R2 (Free & No Login)
Raka Widhi Antoro
Raka Widhi Antoro

Posted on

I built a Serverless Image Host with Vue 3 & Cloudflare R2 (Free & No Login)

The Motivation

As developers, we often need a quick way to host an image for a PR, a README, or a StackOverflow question.

But most free image hosts are either slow, riddled with ads, or require a signup.

I wanted to build something better—something that follows the Unix philosophy:

Do one thing, and do it well.

Meet ImgPeek.

👉 imgpeek.com


The Tech Stack

ImgPeek is built with performance, simplicity, and low cost in mind:

  • Frontend: Vue 3 + Vite (snappy SPA experience)
  • Storage: Cloudflare R2 (S3-compatible — zero egress fees)
  • Backend Logic: Cloudflare Workers (TypeScript)

Key Technical Features

1. Client-Side Processing

All image processing happens directly in the browser using the Canvas API and modern compression algorithms.

  • Compression: Images are compressed before upload to save bandwidth
  • Resizing & Conversion: Fully client-side—raw photos never hit the server unless you're uploading them

2. Direct R2 Uploads

To keep the backend simple and cost-efficient, the client requests a Presigned URL from a Cloudflare Worker.

The file is then uploaded directly to R2.

sequenceDiagram
    Client->>Worker: Request Upload URL
    Worker->>Client: Return Presigned URL
    Client->>R2: PUT /image.png
    R2-->>Client: 200 OK
Enter fullscreen mode Exit fullscreen mode

Top comments (0)