PHP code example of kreyu / placeholder-image

1. Go to this page and download the library: Download kreyu/placeholder-image 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/ */

    

kreyu / placeholder-image example snippets


PlaceholderImage::with($providerAlias)->generate($width, $height, array $options, $ssl = true); 

PlaceholderImage::with('dummy_image')->generate(600, 400, [
    'text' => 'Beep Boop',
    'format' => 'png',
    'background' => 'FF9900',
    'foreground' => 'FFFFFF',
]);