PHP code example of endroid / image-placeholder
1. Go to this page and download the library: Download endroid/image-placeholder library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
endroid / image-placeholder example snippets
twig
<img src="{{ image_url|image_placeholder(200, 300) }}" />
<img src="{{ image_url|image_placeholder(200, 300, { check_image_exists: false }) }}" />