Placeholder images shouldn’t be something you think about — they are placeholders after all. Brent and Russell came up with a wonderfully simple API for automatically embedding placeholder images into your web applications.
How does it work? Just put your image size after our URL and you’ll get a placeholder.
A simple 350×150 image can be rendered by adding this to you web app:
<img src="http://placehold.it/350x150">
As you may expect, the height parameter is optional if you simply need a square image:
<img src="http://placehold.it/350">
You can force a specific image type (like GIF, JPEG, or PNG) by specifying an extension at some place in the URI.
<img src="http://placehold.it/350x150.jpg">
Text may be specified by adding the text parameter in the URI. Note: this seems to be a non-standard query string — not sure why they did it that way, but I’m sure they have their reasons.
<img src="http://placehold.it/350x150.jpg&text=Love+Mike+G">
Colors may be specified by adding your foreground and background hex values after the size parameter.
<img src="http://placehold.it/350x150/336699/FF0099.png&text=Love+Mike+G">
This is a great example of a well designed RESTful API. It’s so simple and so useful. I’m surprised that nobody came up with this any sooner!
via Placehold.it.


