title: Image Intervention InvalidImageDataStringException Laravel
body: <p>Morning People, I cant seem to fix an error, I currently pass base64 string to my <a href="https://github.com/Intervention/image" rel="nofollow">image intervention api</a> and try and save it to a public directory.</p>
  
  <p><strong>Error</strong></p>
  
  <blockquote>
    <p>error:
    {type:Intervention\Image\Exception\InvalidImageDataStringException,
    message:,…} file:
    "/home/celeb/public_html/dev/vendor/intervention/image/src/Intervention/Image/Image.php"
    line: 1968 message: "" type:
    "Intervention\Image\Exception\InvalidImageDataStringException"</p>
  </blockquote>
  
  <p>The data string I pass to Image::make -> <a href="http://pastebin.com/BGbUeZhr" rel="nofollow">http://pastebin.com/BGbUeZhr</a></p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>public function upload(){
  
      $fileName = Input::get('name');
      $explode    = explode('.',$fileName);
      $extension  = strtolower(end($explode));
  
      $img = Image::make(base64_decode(Input::get('data')));
  
      $fileName = "profiles/".md5(time()).'.'.$extension;
      $path = public_path($fileName);
  
      if($img-&gt;save($path)){
          echo "Image Added";
      }
  }
  </code></pre>
  
  <p><strong>Without the base64_decode error.</strong> </p>
  
  <pre><code>{error:{type:Intervention\Image\Exception\ImageNotFoundException,…}}
  error: {type:Intervention\Image\Exception\ImageNotFoundException,…}
  file: "/home/celeb/public_html/dev/vendor/intervention/image/src/Intervention/Image/Image.php"
  line: 198
  message: "Image file (data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA8AAAAIcCAYAAAA5Xcd7AAAgAElEQVR4Xuydh0MUWRLG30RyRgEJKmDOYYN39//f7a5uNOtG3eQqihInXn31uprHiCIyzEzPfG+vrloYpru/Hob5daVUVZbjogJUoCkKPH/+3N27dy+2x48fuxcvXsS2tLTk6vErmkqlnUtlHHxKvPzjrfOtVsuyr7Jz6itN0YM7pQJUgApQgYNVIJPpddnckMvmh9Wns/0uncrK34acS6XhszscgP+bkUrBp+Rv..
  </code></pre>