PHP code example of hryvinskyi / magento2-external-media-prefetcher

1. Go to this page and download the library: Download hryvinskyi/magento2-external-media-prefetcher 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/ */

    

hryvinskyi / magento2-external-media-prefetcher example snippets


'system' => [
    'default' => [
        'external_media_prefetcher' => [
            'general' => [
                'enabled'            => '1',
                'external_media_url' => 'https://www.example.com/media/',
                'allowed_schemes'    => 'https',
                'async_enabled'      => '0',
                'connect_timeout'    => '3',
                'request_timeout'    => '8',
                'retry_count'        => '2',
                'retry_delay_ms'     => '200',
            ],
            'placeholder' => [
                'hash'   => 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
                'length' => '0',
            ],
        ],
    ],
],