I want to use image with Imagick blob I’m getting error message :
"Malformed UTF-8 characters, possibly incorrectly encoded."
/vendor/yiisoft/yii2/helpers/BaseJson.php
My function is in : frontend\actions;
class ImagesOpenAction
public function imageBlobImagick($image)
{
$Imagick = new \Imagick($image->image_origin);
header("Content-Type: ". $image->mime_type);
return $Imagick->getImagesBlob();
}
in view i’m calling my function :
data-image="<?= \frontand\actions\ImagesOpenAction::imageBlobPage($image) ?>"
.
the image path :
uploads/imgl/org/20220220/fffea627523ba6ffa655ab48034f557211082823371645334897/2624842970ff411aa8db3f0c98c5d15a1588335518_org.jpg
In normal php file that is not inside Yii it’s work ; But inside Yii not working.