PHP code example of daun / processwire-image-placeholders
1. Go to this page and download the library: Download daun/processwire-image-placeholders 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/ */
daun / processwire-image-placeholders example snippets
$page->image->lqip; // data:image/png;base64,R0lGODlhEAAQAMQAA
$page->image->lqip(300, 200); // 300x200px
html
<!-- Using the placeholder as src while lazyloading the image -->
<img
src="<?= $page->image->lqip