PHP code example of html2img / statamic-og-images

1. Go to this page and download the library: Download html2img/statamic-og-images 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/ */

    

html2img / statamic-og-images example snippets

bash
php artisan vendor:publish --tag=statamic-og-images-config
php artisan vendor:publish --tag=statamic-og-images-views
bash
php please og:generate
php please og:generate --collection=blog --force