Search code examples
phpwampintervention

Intervention can't read exif data but exif_read_data() can


$image->exif() returns null while exif_read_data($path) returns all of the info I need. I'd rather use intervention because I wont always have a local file. Any ideas?


Solution

  • The reason is because you have to be dealing with a physical file, not its' contents. So if you do this, it wont work:

    $image->make(file_get_contents($path));
    

    But will if you reference a path:

    $image->make($path);
    

    Hope that helps anyone else running into this issue.