Nov 18, 2016
0
Level 4
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
Please or to participate in this conversation.