title: Laravel 5.4 Error: NotReadableException: Image source not readable
body: <p>I'm trying to create multiple copies of profile pic in different sizes when a profile is created. But I am constantly getting this error:</p>
  
  <p>" NotReadableException: Image source not readable"</p>
  
  <p>Can somebody point me what I'm missing in my below code:</p>
  
  <pre><code>public function updateprofile(UserProfileRequest $request){
      $user_id = Auth::User()-&gt;id;
      $profile = UserProfile::where('user_id','=',$user_id)-&gt;first();
      $profile-&gt;fullname = $request-&gt;fullname;
  
      if ($request-&gt;hasFile('img')) {
          if($request-&gt;file('img')-&gt;isValid()) {
              $types = array('_original.', '_32.', '_64.', '_128.');
              $sizes = array( '32', '64', '128');
              $targetPath = 'public/uploads/'.$user_id;
  
              try {
                  $file = $request-&gt;file('img');
                  $ext = $file-&gt;getClientOriginalExtension();
                  $fName = time();
                  $original = $fName . array_shift($types) . $ext;
                  Storage::putFileAs($targetPath, $file, $original);
  
                  foreach ($types as $key =&gt; $type) {
                      $newName = $fName . $type . $ext;
                      Storage::copy($targetPath . $original, $targetPath . $newName);
                      $newImg = Image::make($targetPath . $newName);
                      $newImg-&gt;resize($sizes[$key], null, function($constraint){
                          $constraint-&gt;aspectRatio();
                      });
                      $newImg-&gt;save($targetPath . $newName);
                  }
  
                  $profile-&gt;img = 'public/uploads/'.$user_id;
              } catch (Illuminate\Filesystem\FileNotFoundException $e) {
              }
          }
      }
  
      $profile-&gt;save();}
  </code></pre>