Generate placeholder images on your WP instance
- WordPress 6.2+
- PHP 8.2+
Download and unzip into a subfolder of your wp-content/plugins
folder.
In your WordPress go to the Dashboard and then to Plugins, find the Placeholders plugin and activate it.
Create an img
tag and in its src
attribute call the url
function from the Placeholders
class:
<img src="<?php Placeholders::url(720, 480, true); ?>" alt="" class="img-responsive">
The first parameter is the width, the second one is the height and the last one controls whether to echo the generated URL or not.
Also, you can use a shortcode:
[placeholder width="1024" height="768"]
And you may also specify a custom class:
[placeholder width="1024" height="768" class="img-fluid"]
MIT licensed
Includes the Roboto Regular font, which is covered by the Apache License 2.0, you can find more details here.
Author: biohzrdmx <github.com/biohzrdmx>