PHP code example of ratulhasan / image

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

    

ratulhasan / image example snippets


$image_file = 'upload_file.jpg'
$destination = 'uploaded_path/upload_file.jpg'
$desired_width = 600 (optional)
$desired_height = 600 (optional)

\RatulHasan\Image\Image::createThumb($image_file, $destination, $desired_width, $desired_height)