diff --git a/src/Intervention/Image/AbstractDecoder.php b/src/Intervention/Image/AbstractDecoder.php index 714797ab..5eabd8ff 100644 --- a/src/Intervention/Image/AbstractDecoder.php +++ b/src/Intervention/Image/AbstractDecoder.php @@ -78,7 +78,11 @@ abstract class AbstractDecoder */ public function initFromStream($stream) { - if ($data = @stream_get_contents($stream)){ + $offset = ftell($stream); + rewind($stream); + $data = @stream_get_contents($stream); + fseek($stream, $offset); + if ($data) { return $this->initFromBinary($data); }