npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

placeholdjs

v1.0.0

Published

CLI tool to generate placeholder images locally with custom dimensions, colors, text and batch processing

Readme

placeholdjs

CLI tool to generate placeholder images locally with custom dimensions, colors, text and batch processing.

npm version License: MIT

Features

  • 📐 Custom Dimensions - Generate images of any size
  • 🎨 Custom Colors - Set background and text colors with hex values
  • ✏️ Custom Text - Add custom text or auto-display dimensions
  • 📦 Batch Processing - Generate multiple images at once
  • 🖼️ Multiple Formats - PNG, JPG, WebP support
  • 🔲 Border Option - Add borders to images
  • Offline - Works without internet connection

Installation

npm install -g placeholdjs

Usage

Basic

# Generate 800x600 placeholder (saved to ~/.placehold/exports/)
placehold 800x600

# Specify output path
placehold 400x300 -o avatar.png

# Different format
placehold 1920x1080 -f jpg -o banner.jpg

Custom Colors

# Custom background
placehold 500x500 -b "#3498db" -o blue.png

# Custom background and text color
placehold 800x600 -b "#2c3e50" -c "#ecf0f1" -o dark.png

# Using short hex
placehold 300x300 -b "#f00" -c "#fff" -o red.png

Custom Text

# Custom text
placehold 800x400 -t "Hero Image" -o hero.png

# Custom text with font size
placehold 400x200 -t "Avatar" -s 24 -o avatar.png

# Auto font size (default)
placehold 1200x630 -t "Open Graph Image" -o og.png

With Border

# Add border
placehold 300x300 --border -o bordered.png

# Border with colors
placehold 500x500 -b "#fff" --border -o card.png

Batch Processing

# Generate 10 placeholders
placehold 400x300 --batch 10

# Batch with custom output directory
placehold 800x600 --batch 5 -o ./placeholders/

# Batch with styling
placehold 300x200 --batch 20 -b "#e74c3c" -f webp

Options

| Option | Alias | Description | Default | |--------|-------|-------------|---------| | --output | -o | Output file path | ~/.placehold/exports/ | | --format | -f | Output format (png, jpg, webp) | png | | --background | -b | Background color (hex) | #CCCCCC | | --color | -c | Text color (hex) | #666666 | | --text | -t | Custom text to display | dimensions | | --fontsize | -s | Font size (px) or "auto" | auto | | --border | - | Add border to image | false | | --batch | - | Number of images to generate | - | | --version | -v | Show version | - | | --help | -h | Show help | - |

Output Directory

By default, images are saved to ~/.placehold/exports/. Override with -o:

# Default directory
placehold 800x600
# Output: ~/.placehold/exports/hold-800x600-1703698800000.png

# Custom path
placehold 800x600 -o ./images/hero.png
# Output: ./images/hero.png

# Custom filename (in default directory)
placehold 800x600 -o myimage.png
# Output: ~/.placehold/exports/myimage.png

Color Formats

Supports hex colors in multiple formats:

  • #RGB#F00 (red)
  • #RRGGBB#FF0000 (red)
  • #RGBA#F00F (red, full opacity)
  • #RRGGBBAA#FF0000FF (red, full opacity)

Use Cases

Web Development

# Product thumbnails
placehold 300x300 --batch 20 -o ./products/

# Hero banners
placehold 1920x600 -t "Hero Banner" -o hero.png

# Avatar placeholders
placehold 100x100 -b "#3498db" -c "#fff" -t "U" -o avatar.png

Social Media

# Open Graph
placehold 1200x630 -t "OG Image" -o og.png

# Twitter Card
placehold 1200x600 -t "Twitter Card" -o twitter.png

# Instagram Post
placehold 1080x1080 -o instagram.png

Prototyping

# Mobile screens
placehold 375x812 -t "iPhone" -o iphone.png
placehold 390x844 -t "iPhone 14" -o iphone14.png

# Desktop
placehold 1920x1080 -t "Desktop" -o desktop.png

Why placeholdjs?

| Feature | placeholdjs | Online Services | |---------|-------------|-----------------| | Offline | ✅ | ❌ | | No rate limits | ✅ | ❌ | | Batch generation | ✅ | Limited | | Custom fonts | ✅ | Limited | | Privacy | ✅ Local | ❌ Server | | Speed | ✅ Instant | Depends on network |

License

MIT © CasDevSilva