PHP Placeholder Images

A little placeholder image generator

Download .zip Download .tar.gz View on GitHub

Placeholder image services like placehold.it are awesome, but are often very slow. This is a little script that can be self hosted - perfect for working locally or offline.

Requirements:

PHP with GD support enabled (run phpinfo() to check)

Usage (all parameters are optional):

<img src="placeholder.php?size=400x150&bg=eee&fg=999&text=Generated+image" alt="Placeholder image" />

Examples :

Placeholder image

  • No parameters

Placeholder image

  • Size: 300x150
  • Background: 9bce3b
  • Foreground: fff

Placeholder image

  • Size: 400x200
  • Text: Generated+image