kekekiw123's avatar

Storage::get() does not return exif data of image

I am trying to get the image exif data so that I can use the Image intervention orientate function.

The only problem is that I cant read the exif data using the Storage::get()

First I am storing Uploaded images like this:

$filename = uniqid().'.'.$file->getClientOriginalExtension();
$path = "images/$id/$filename";
Storage::put($path, File::get($file->getRealPath()));

The in a queue I am reading the images, doing some resizing and upload to AWS:

$image = Image::make(Storage::disk('images')->get("$this->id/$file"));
            $image->orientate();
            $image->resize(null, 600, function ($constraint) {
                $constraint->aspectRatio();
            });
            $image->stream('jpg', 85);
Storage::put("images/$this->id/main/$file", $image);
$image->destroy();

The image does get resized and uploaded to AWS but the only problem is that it will show up sideways, so it seems that I cant read the exif data using: Storage::disk('images')->get("$this->id/$file")

I have runned: php -m | more and I can see that "exif" is listed so I have the module in my Laravel Forge DO server

0 likes
0 replies

Please or to participate in this conversation.