Nicholas Cage

devel_generate is a staple of the Drupal developer's toolbox. It allows you to create arbitrary content, users, and more with placeholder text and images automatically. This allows you to QA performance of queries, test wrapping of headings and text, and a lot more.

If you've used develgenerate before, you know that the placeholder images are a bit, well... boring. Luckily, a contrib module called develimage_provider allows you to spice things up. Out of the box it includes bacon, flickr, manatees, kittens, zombies, and more images.

But are those options really good enough for enterprise-level testing? If you want to be sure that your layout can handle the image-iest of images, that Views can serve awesomeness a la mode, the solution is obvious: Nicolas Cage placeholder images.

PlaceCage to the rescue! This placeholder image site serves up quality random Nicolas Cage images with a simple URL interface (that happens to work like other placeholder image sites). Here's how to Cage it up:

Define a Plugin

A develimageprovider plugin is just an include file with an array:

It tells the module which class handles the plugin named in the title key.

Make a Provider

The code below looks like quite a bit of work. It isn't, though. All the work has been done by the other placeholder image services; just copy/paste the placekitten or other class and augment to suit.

The only part that deviates from the typical placekitten implementation is that placecage has an option for "crazy" cage photos. Rather than implement crazy along with grayscale, I added a randomizer that intermingles crazy color pictures with regular ones.


Put those files in the develimageprovider plugins directory, select PlaceCage in the configuration settings, and generate some dummy content. That's all there is to it!