PHP code example of escolalms / images

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

    

escolalms / images example snippets

 
$path = 'test.jpg';
$params = ['w'=>100];

$hash = sha1($path.json_encode($params));

$output_file = $url_prefix.$hash.$extension;
bash
POST /api/images/img HTTP/1.1
Host: localhost:1000
Content-Type: application/json
Content-Length: 212

{
  "paths": [{
    "path": "tutor_avatar.jpg",
    "params": {
      "w": 100
    }
  }, {
    "path": "tutor_avatar.jpg",
    "params": {
      "w": 200
    }
  }, {
    "path": "tutor_avatar.jpg",
    "params": {
      "w": 300
    }
  }]
} 

$this->app->extend('filesystem', function ($service, $app) {
    return new CustomFilesystemManager($app);
});