This package allows to upload image to server by image url.
The preferred way to install this extension is through composer.
Either run
composer require andreaslancom/image_downloader:dev-master
or add
"andreaslancom/image_downloader": "dev-master"
to the require
section of your composer.json.
This package allows to upload image to server by image url.
The following example shows how to use this package:
use image\download\ImageDownloader;
// download an image
$imageDownloader = new ImageDownloader();
$imageDownloader->download(
'http://some_image_addr.ext',
'project_root_path'.DIRECTORY_SEPARATOR.'writable_directory'
);
Note if upload directory $dir not exists that the system tries to create this