O
O
Oleg Belyay2017-10-26 17:16:42
Yii
Oleg Belyay, 2017-10-26 17:16:42

Call to undefined method yii\imagine\Image::resize(). Why doesn't it find it?

Call to undefined method yii\imagine\Image::resize(). Why doesn't it find it?
The documentation says that there is such a method.
www.yiiframework.com/doc-2.0/yii-imagine-baseimage...
Tried again via yii\imagine\BaseImage still the same error.
Here is the code:

$watermark = \yii\imagine\BaseImage::resize(
  $_SERVER["DOCUMENT_ROOT"].'/upload/art-code.png',
  $width
);
$image = Image::watermark(
  $image,
  $watermark,
  [0,0]
)->save($savePath);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mykola, 2017-10-26
@iSensetivity

You need to update the version of the imagine/imagine library.

E
Evgeny Akhmetov, 2017-10-26
@asperin2

Most likely the php gd add-on is not installed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question