A fast, simple, and customizable placeholder image service
Live Demo β’ Features β’ Usage β’ API Reference β’ Deployment
Open Placeholder is a high-performance placeholder image generator built with Next.js and Edge Runtime. It provides dynamic image generation with custom dimensions and text, perfect for mockups, prototypes, and development.
- π Edge Runtime - Lightning-fast image generation at the edge
- π Flexible Sizing - Support for any dimensions up to 4000x4000 pixels
- π Custom Text - Display custom text instead of dimensions
- πΎ Smart Caching - Optimized with CDN cache headers for performance
- π¨ Clean Design - Minimalist aesthetic with Geist font
- π§ Zero Configuration - Works out of the box with sensible defaults
- π Self-Hostable - Deploy your own instance in seconds
Generate a 600x400 placeholder image:
https://openplaceholder.com/600x400
Create a 256x256 square image with a single dimension:
https://openplaceholder.com/256
Display custom text instead of dimensions:
https://openplaceholder.com/600x300/Hello%20World
https://openplaceholder.com/[width]x[height]/[text]
| Parameter | Type | Description | Example |
|---|---|---|---|
width |
number | Image width in pixels (1-4000) | 600 |
height |
number | Image height in pixels (1-4000) | 400 |
text |
string | Optional custom text (URL encoded) | Hello%20World |
<img src="https://openplaceholder.com/600x400" alt="Placeholder"><img src="https://openplaceholder.com/512" alt="Square placeholder"><img src="https://openplaceholder.com/800x200/Coming%20Soon" alt="Coming Soon"><img src="https://openplaceholder.com/1200x400/Hero%20Banner" alt="Hero Banner">- Next.js 15 - React framework with App Router
- React 19 - UI library
- @vercel/og - Image generation
- Tailwind CSS - Styling
- TypeScript - Type safety
- Zod - Runtime validation
Deploy your own instance with one click:
- Clone the repository:
git clone https://github.com/akshitkrnagpal/open-placeholder.git
cd open-placeholder- Install dependencies:
npm install
# or
pnpm install- Run the development server:
npm run dev
# or
pnpm dev- Build for production:
npm run build
npm run startNo environment variables are required for basic functionality. The app works out of the box!
- Node.js 18+
- npm, yarn, or pnpm
# Clone the repo
git clone https://github.com/akshitkrnagpal/open-placeholder.git
cd open-placeholder
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Build for production
pnpm build
# Run production build
pnpm start
# Run linter
pnpm lintopen-placeholder/
βββ app/
β βββ [...filename]/ # Catch-all route for image generation
β β βββ route.tsx # Image generation endpoint
β βββ layout.tsx # Root layout
β βββ page.tsx # Landing page
βββ utils/
β βββ parser.ts # URL parameter parsing
β βββ data.ts # GitHub data fetching
βββ fonts/
β βββ geist/ # Local font files for image generation
βββ public/ # Static assets
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
- Inspired by placehold.co
- Built with Vercel's Edge Runtime
- Typography by Geist Font
Made with β€οΈ by Akshit Kr Nagpal