image icon indicating copy to clipboard operation
image copied to clipboard

Image source not readable while adding watermark to image

Open samalapsy opened this issue 8 years ago • 1 comments

I want to add watermark to my images but It's throwing the error "Image source not Readable". I've used it on my local host and it worked fine. Please kinldy help me check what's wrong. Thank You.

I've tried this

		$fileName = "img-".$key. "." . strtolower($image->getClientOriginalExtension());
                $img = Image::make($image->getRealPath());
                $watermark = Image::make(public_path('img/logo.png'));
                $img->insert($watermark)->save($path.'/'.$fileName);

and this

$fileName = "img-".$key. "." . strtolower($image->getClientOriginalExtension());
                $img = Image::make($image->getRealPath());
                $img->insert(public_path('img/logo.png'))->save($path.'/'.$fileName);

But all still give the same Image source not readable error

samalapsy avatar Jun 06 '17 17:06 samalapsy

I've found the problem..

public_path() // is add 'public' to my image url so I had to remove it

samalapsy avatar Jun 07 '17 00:06 samalapsy