title: Laravel image validation failed
body: <p>This code worked in my local but not on live server, on live server some images cannot be uploaded but some can but i can't see the difference between the images.</p>
  
  <pre><code>ini_set('memory_limit','512M');
  
  $this-&gt;middleware('auth');
  
  $this-&gt;validate($request, [
      'image' =&gt; 'required|image|mimes:jpeg,png,jpg,gif,svg|max:5120',
      'description' =&gt; 'required'
  ]);
  
  $image_name = 'IMG'.time().'_'.rand(1000,9999);
  $image_name_thumb = $image_name."_thumb";
  $extension = ".".$request-&gt;image-&gt;getClientOriginalExtension();
  $image_name_ext = $image_name.$extension;
  $image_name_thumb_ext = $image_name_thumb.$extension;
  $request-&gt;image-&gt;move(public_path('images/wall/'), $image_name_ext);
  $img = Image::make(public_path('images/wall/'.$image_name_ext));
  $img-&gt;resize(250, null, function ($constraint) { $constraint-&gt;aspectRatio();});
  $img-&gt;save(public_path('images/wall/'.$image_name_thumb_ext));
  </code></pre>
  
  <p>This is the error message returned by </p>
  
  <pre><code>$errors-&gt;first('image')
  </code></pre>
  
  <p>"The image failed to upload."</p>