Laravel Intervention Issue

Closed Posted 3 years ago Paid on delivery
Closed Paid on delivery

I am getting the error "Unable to init from given binary data"

$img = '[login to view URL]';

$path = public_path() . "/storage/img/reviews/" . $img;

$thumbnailImage = TImage::make(file_get_contents($path));

$thumbnailPath = public_path().'/storage/img/reviews/thumbnails/' . $img;

$thumbnailImage->resize(150,150);

$thumbnailImage->save($thumbnailPath);

Then I did this code:

public function file_get_contents_curl($url) {

$ch = curl_init();

curl_setopt($ch, CURLOPT_HEADER, 0);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.

curl_setopt($ch, CURLOPT_URL, $url);

$data = curl_exec($ch);

curl_close($ch);

return $data;

}

public function uploadThumbnail(){

$img = '[login to view URL]';

$path = public_path() . "/storage/img/reviews/" . $img;

$thumbnailImage = TImage::make($this->file_get_contents_curl(base64_decode($path)));

$thumbnailPath = public_path().'/storage/img/reviews/thumbnails/' . $img;

$thumbnailImage->resize(150,150);

$thumbnailImage->save($thumbnailPath);

}

I am getting the error "image source is not readable"

The image exists but the problem still happens. You are required to work remotely.

PHP Laravel

Project ID: #29374780

About the project

10 proposals Remote project Active 3 years ago

10 freelancers are bidding on average $16 for this job

shasanulgoni

- - - - READY TO START WORKING NOW - - - - Hi there! I have checked your project(Laravel Intervention Issue) description and understood the project needs. Still, I'm working(part-time) as a full-stack developer for More

$50 USD in 7 days
(33 Reviews)
5.7
hareshchauhan566

Hello *‿*, #Expert Laravel 2+ years professional experience. # Available To start Work now ! (✨ Experience *‿* ✨) ~> 2+ Years Experience, I am working with Technology since 2018 ~> 30+ Projects done in Different Langu More

$12 USD in 1 day
(46 Reviews)
4.8
xactbid

Respected Sir/ Madam I hope you are doing well. This is Darin Johnson, Senior Project Manager from Xoom Web Solutions. We are having more than 50+ engineers in our team including Developers & Designers. We are havin More

$11 USD in 7 days
(10 Reviews)
4.3
swapinfoway

Dear Client, have an image intervention issue I can solve easily I'm laravel expert plz check my portfolio all webs in laravel https://www.freelancer.com/u/swapinfoway I have read your job description carefully and bui More

$12 USD in 1 day
(15 Reviews)
3.3
achrarajeev

Hi, I have gone through the mentioned code and can help you to sort the issue. I am ready to work immediately on the project. I have 8+ years of experience with Laravel and can assure you to provide the most effective More

$17 USD in 7 days
(0 Reviews)
0.0
jaisonjebi

I have about 6 year exprence.I am web developer working with following languages php,laravel framework,javascript,ajax,jquery,mysql

$11 USD in 7 days
(0 Reviews)
0.0
emanmohamedkam

Hello, sir. I hope you are doing well. I am very fond of the Laravel framework since it has powerful engines such as middleware, artisan, eloquent ORM, migration, and blade template, I have over 3 years of quality exp More

$10 USD in 4 days
(0 Reviews)
0.0
Dhaval14

Hello Sir, I am available to start right now. I have more than 4 Years of experience as PHP Developer. I have used Images intervation for images upload in laravel quite a lot time. Feel free to message for project de More

$10 USD in 4 days
(2 Reviews)
0.0