1. Go to this page and download the library: Download stormwild/image-resizer 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/ */
use \Stormwild\ImageResizer;
$resized = ImageResizer::resizer($path, $width, $height);
// possibly in controller action
// check if image uploaded successfully
// get path to uploaded image
$path = "path/to/uploaded/file.ext"; // real path to file on server
$width = 1050;
$height = 700;
$resized = ImageResizer::resize($path, $width, $height);
if($resized) {
// upload to cloud storage
// get url from cloud
// save model with reference to image url
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.