Im receiving a binary image from an API (Line API)
// if status 200
if ($response->isSucceeded()) {
// get binary image from api
$binary = $response->getRawBody();
// convert to base64?
$imageData = base64_encode($binary);
// what do i do here?
}
After receiving it, I want to save the image in my public folder and save the path in my database. There were several answers on SO that I thought could work like using intervention/image but I could not manage to fix this. Ive also found a comment saying this cant be done. Can someone give me a hint how I could do this. Or if this is even possible?
Thank you.