This is a very simple placeholder project featuring lovely elephpants. It's built with Silex+Flint.
You can use this project as a base for your very own image placeholder. Just change the settings in the app/config/config.yml file and use your own image resources.
You can point the src of your images direct to http://placephant.com with the desired width and height as path parameters, as shown below:
300x250 colored image:
100x100 square colored image (just need to provide the width):
300x250 black and white image:
verbose mode - shows the image dimensions on b&w image
300x250 sepia image:
Placephant requires php >= 5.4 and the php5-imagick extension.
A Vagrant setup is provided, using the Ansible Provisioner.
You'll need Vagrant, VirtualBox and Ansible. This setup was tested on Ubuntu 12.04 with Vagrant 1.4.2, VirtualBox 4.3.6 and Ansible 1.4.1 .
Linux users will also need
nfs-kernel-server in order to use the NFS shared folders (increases performance).
vagrant up, the application will be running at
Ansible hangs forever on
composer install : hit ctrl+c to cancel the provision, then run it again. It will finish the other tasks, then you can log in and run
composer install manually. This might be caused by composer asking for github credentials, or some other error from github - so its better to login with
vagrant ssh and check what's going on.