title: laravel filemanager: 500 Internal Server Error while cropping and resizing
body: <p>I am using <code>unisharp filemanager</code> in <code>Laravel 5.4</code> - <a href="https://github.com/UniSharp/laravel-filemanager" rel="nofollow noreferrer">laravel-filemanager</a></p>
  
  <p>I configured everything according to the <a href="https://unisharp.github.io/laravel-filemanager/installation" rel="nofollow noreferrer">documentation</a> and <a href="https://unisharp.github.io/laravel-filemanager/integration" rel="nofollow noreferrer">Integration</a>. I can upload files now, but unable to crop and resize the same uploaded image. <br>
  I get following error in console <br><br>
  <code>Failed to load resource: the server responded with a status of 500 (Internal Server Error) - http://127.0.0.1:8000/laravel-filemanager/doresize?img=http%3A%2F%2F127.0.0.1%3A8000%2Fphotos%2F1%2F835e871b8f5105255b1ead21947b6799.jpeg&amp;working_dir=%2F1&amp;dataHeight=&amp;dataWidth=&amp;=1490245875358</code> <br><br>
  And if I go to the link above it throws an error  <br><br> <code>NotReadableException in AbstractDecoder.php line 335:
  Image source not readable</code><br><br>
  Code in <code>crop.blade.php</code> in filemanager looks like below <br><br></p>
  
  <pre><code> &lt;button class="btn btn-primary" onclick="performCrop()"&gt;
    {{ trans('laravel-    filemanager::lfm.btn-crop') }}
   &lt;/button&gt;
   &lt;button class="btn btn-info" onclick="loadItems()"&gt;
    {{ trans('laravel-    filemanager::lfm.btn-cancel') }}
   &lt;/button&gt;
    &lt;form action="{{ route('unisharp.lfm.getCrop') }}" role='form' name='cropForm' id='cropForm' mathod='post'&gt;
      &lt;input type="hidden" id="img" name="img" value="{{ $img }}"&gt;
      &lt;input type="hidden" id="working_dir" name="working_dir" value="{{ $working_dir }}"&gt;
      &lt;input type="hidden" id="dataX" name="dataX"&gt;
      &lt;input type="hidden" id="dataY" name="dataY"&gt;
      &lt;input type="hidden" id="dataWidth" name="dataWidth"&gt;
      &lt;input type="hidden" id="dataHeight" name="dataHeight"&gt;
      &lt;input type='hidden' name='_token' value='{{csrf_token()}}'&gt;
    &lt;/form&gt;`
  </code></pre>
  
  <p>How to resolve this 500 Internal Server Error error?</p>