We have found the error in the file wp-content/plugins/knews/includes/resize_img.php
This file try to save the image but the path was wrong.
The original file was:
if (is_file($wp_dirs['basedir'] . $url)) {
$size = getimagesize($wp_dirs['basedir'] . $url);
if ($size[0]==$width && $size[1]==$height) {
$jsondata['result'] = 'ok';
$jsondata['url'] = $wp_dirs['baseurl'] . $url;
return $jsondata;
}
}
This is our modification to let the insert from url of images work:
if (is_file( $wp_dirs['basedir'] . $url)) {
$size = getimagesize($wp_dirs['basedir'] . $url);
if ($size[0]==$width && $size[1]==$height) {
$jsondata['result'] = 'ok';
$jsondata['url'] = $wp_dirs['baseurl'] . $url;
return $jsondata;
}
}
elseif ( preg_match('/^http/i', $url)) {
$jsondata['result'] = 'ok';
$jsondata['url'] = $url;
return $jsondata;
}
This modification consider the image url only and it’s not saved in the file system.
Hope this help for a fix 🙂
We made another fix for the image from url. If you try to use and image from another wordpress using its url you got the same error “Image doesn’t exists”. We fix also the image from asp urls.
So change:
elseif ( preg_match('/^http/i', $url)) {
$jsondata['result'] = 'ok';
$jsondata['url'] = $url;
return $jsondata;
}
with:
elseif ( preg_match('/^http/i', $url_img)) {
$jsondata['result'] = 'ok';
$jsondata['url'] = $url_img;
return $jsondata;
}
Hope this will help too 😉
Hello @grupporetina… it’s a good appointment, we will include it in future…
But should include a blocking option to resize the image, and get the real image size & change in the newsletter… because some versions of outlook ignores the width & height attributes, and we won’t distorsion in images…
We will study it, adding some advice and blocking the resize for this external images…
Kind regards,
Carles Reverter.