PHP code example of shawnsandy / img-fly

1. Go to this page and download the library: Download shawnsandy/img-fly 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/ */

    

shawnsandy / img-fly example snippets

 html
<img src="{{ Imgfly::imgFly('apple-mouse.jpeg?w=500') }}" alt="">
 html
<img src="{{ Imgfly::imgPublic('hands.jpeg?w=500', 'img') }}" alt="">
 text
php artisan vendor:publish --tag=imgfly_config
 php
[

    "icon" => "?w=60&h=60&fit=crop-center",

    "small" => "?w=100&h=100&fit=crop-center",

    "thumbnail" => "?w=200&h=200&fit=crop-center",

    "medium" => "?w=600&h=400&fit=crop-center",

    "large" => "?w=1200&h=600&fit=crop-center",

];
 blade
<img src="{{ Imgfly::imgPreset('hands.jpg', 'icon') }}" alt="">
<img src="{{ Imgfly::imgPreset('hands.jpg', 'small') }}" alt="">
<img src="{{ Imgfly::imgPreset('hands.jpg', 'thumbnail') }}" alt="">