.....
$img = new Image();
$imagedata = file_get_contents($ad_data['link']);
$base64 = base64_encode($imagedata);
echo $base64;
$img->data = $base64;
$textAd = new ImageAd();
$textAd->name = $ad_data['imagename']." #".uniqid();
$textAd->image = $img;
...
And now I have got this error:
An error has occurred: [ImageError.INVALID_IMAGE @ operations[0].operand.ad.image.data]
Input image source view like this: /var/www/my/site/imagefolder/m7im4.png
Do you have any idea ?