Answer the question
In order to leave comments, you need to log in
How to work with ImageHandler.php correctly?
Hello, a question for those who worked with this library, please tell me how to display an image on the screen after processing by the ImageHandler class?
I do it like this:
$image = new ImageHandler();
$image->load(Yii::getAlias('@webroot')."/files/1.jpg")->resize(100,100)->show();
Answer the question
In order to leave comments, you need to log in
Here's how to do it: create an additional image.php file, write it there
Header("Content-type: image/jpeg");
$image = new ImageHandler();
$image->load(Yii::getAlias('@webroot')."/files/1.jpg")->resize(100,100)->show();
<img src="image.php" alt="image.php">
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question