Dynamic Dummy Image Generator — as seen on DummyImage.com
PHP
Switch branches/tags
Nothing to show
Clone or download
Latest commit 2e0d58d Dec 26, 2017
Permalink
Failed to load latest commit information.
.htaccess Rewrite. :) Dec 26, 2017
LICENSE Added MIT license. Dec 26, 2017
LICENSE-RobotoMono Removed DroidSans, added RobotoMono. Dec 26, 2017
README.md Typo. Dec 26, 2017
RobotoMono-Regular.ttf Removed DroidSans, added RobotoMono. Dec 26, 2017
image.php Rewrite. :) Dec 26, 2017

README.md

Dynamic Dummy Image Generator
— as seen on DummyImage.com

This script enables you to create placeholder images in a breeze.

Usage

Just link to the image.php file via the HTML <img> element. For example, <img src ="image.php?size=500x250&type=png&bg=f00&color=ffffff&text=Dummy" alt="Dummy Image"> would create a PNG image with red (#f00) background, white (#ffffff) text, the word “Dummy” written on it and a size of 500px width, 250px height.

This script handles the following parameters, where basically all of them are optional.

  • size *(default: 640x480) — Examples:
    500x250 (= 500px width, 250px height)
    500 (= 500px square) *
  • type (default: png) — Examples:
    png (= PNG image)
    gif (= GIF image)
    jpeg or jpg (= JPEG image)
  • bg (default: CC0099) — Examples:
    f00 (= #FF0000 as background color)
    FF0855 (= #FF0855 as background color)
  • color (default: FFFFFF) — Examples:
    000 (= #000000 as font color)
    FFFFFF (= #FFFFFF as font color)
  • text (default: {WidthOfTheImage}×{HightOfTheImage}) — Examples:
    Lore Ipsum (= Image has Lore Ipsum written on it)

License

Please see the license file for more information.

Credits

Original idea by Russel Heimlich. When I first published this script, DummyImage.com was not Open Source, so I had to write a small script to replace the function on my own server.