2

I am trying to read image from the URL http://www.example.com/uploads/sample.jpg using intervention library using this Intervention Make. But its giving me a blank object of the image.

$manager = new ImageManager();
$image = $manager->make($imgUrl);

And I am getting this object in the response.

Image {#543
  #driver: Driver {#544
    +decoder: Decoder {#545
      -data: null
    }
    +encoder: Encoder {#546
      +result: null
      +image: null
      +format: null
      +quality: null
    }
  }
  #core: gd resource @12
    size: "1920x1080"
    trueColor: true
  }
  #backups: []
  +encoded: ""
  +mime: "image/jpeg"
  +dirname: null
  +basename: null
  +extension: null
  +filename: null
}

How can i get read the file so that I can get proper information of the image.

Thanks.

Zayn Ali
  • 4,765
  • 1
  • 30
  • 40
Wasif Iqbal
  • 474
  • 1
  • 4
  • 17
  • I supose you use another link? Because `http://www.example.com/uploads/sample.jpg` is not an image... – Jerodev Aug 01 '17 at 14:55
  • Ofcouse itsanother link. Its the sample url that I provide. I am trying to fetch it from my localhost storage folder. – Wasif Iqbal Aug 01 '17 at 14:57
  • Possible duplicate of [Intervention Image: Save image directly from an url with original file name and ext?](https://stackoverflow.com/questions/32828606/intervention-image-save-image-directly-from-an-url-with-original-file-name-and) – RAUSHAN KUMAR Aug 01 '17 at 14:59
  • Yes. But that is for saving the image. I am trying to read the image info which I am getting blank. I want to do the same but before that I need information of the image which i am getting blank in the object. – Wasif Iqbal Aug 01 '17 at 17:00

0 Answers0