See the basic usage with the filters, fit, name options to define a specific image, format and style. And examples to get to know all the options that can make you creative in using placephant.
The basic version to get an image is to add an image with the wanted width and heigth in the path.
<img src="//placephant.com/300/250"/>
If you want a square image you can use one size.
<img src="//placephant.com/300"/>
It is possible to use 0 for one of the sizes, this will result in an image that keeps the original ratio. The maximum size that you can use is a width of 2500 and a height of 2500 any size above that will be set to the maximum.
There are two filter options:
The first option is greyscale (you can also use g or bw).
The second option is sepia.
You can add a query parameter to use a filter: <img src="//placephant.com/300/250?filter=greyscale"/> , or you can add it as first part before the sizes: <img src="//placephant.com/greyscale/300/250"/>
With the fit option you can decide how the image will fit in the targeted size.
You can add the fit as a query parameter: <img src="//placephant.com/300/250?fit=max"/> .
With the name option you can decide to get a specific image from the Current ElePHPant photo's.
You can add the name as a query parameter: <img src="//placephant.com/300/250?name=psr-8-elephpants"/> .
Placephant is a project created and hosted by Tobias van Beek.
The inspiration is from the previous project https://github.com/erikaheidi/placephant created by Erika Heidi.
The author of the Elephpant images are listed in the Current ElePHPant photos section.
This project couldn't exist with the creation of the ElePHPants by Vincent Pontier
Without PHP this website would not work and the ElePHPants would never have existed.