So heres my code
public static function getImageThumb($link) {
$domain = substr(Request::root(), 7);
if(starts_with(Request::root(), 'http://')) {
$domain = substr(Request::root(), 7);
}
$link = $domain.$link; // This is prety much something like this domain.name/uploads/image/13_0.jpeg
$img = Image::cache(function ($image) use ($link) {
return $image->make($link)->resize(230, 140);
}, 5, true);
return $img;
}
And it gives me this: Intervention \ Image \ Exception \ NotReadableException Image source not readable
I dont really know whats wrong here..
Thanks for help!
EDIT-------------------------
I fixed it like this:
public static function getImageThumb($link) {
$link = trim($link, '/');
$img = Image::cache(function ($image) use ($link) {
return $image->make($link)->resize(230, 140);
}, 5, true);
return $img;
}
But how do i get the link to img now? So i can place it in src for img tag.