i want to add some text on image ....i have already a image and add text on that ....so now i'm using the image intervention package.It is working fine in my local machine but on server it showing some image source nor readable error....and i saw when i upload this code ...the image text is working fine with the public folder but i want to add the images on public_html/images not the public/images because the main folder of images is located in public_html so may be i have to change the default public path public to public_html.
Image make function
{
$img = Image::make(public_path('/home/u944619310/domains/shubhampackers.com/public_html/images/Capture.JPG'));
$img->text('This is a example ', 300, 300);
$img->save(public_path('/home/u944619310/domains/shubhampackers.com/public_html/images/vivk.jpg'));
return response()->json(['success'=>true]);
}
error showing
message: "Image source not readable", exception: "Intervention\Image\Exception\NotReadableException",…}
exception: "Intervention\Image\Exception\NotReadableException"
file: "/home/u944619310/domains/shubhampackers.com/public_html/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php"
line: 346
message: "Image source not readable"
even i tried given method from stack overflow to do some changes in App/Providers/AppServiceProvider.php
public function register()
{
//
$this->app->bind('path.public', function() {
return base_path().'/public_html';
});
}