My file images uploader was working perfectly fine and out of no where it started to give me error only for the JPG files. I didn't do any changes on the code in controller or form submission .. all i did was composer upgrade to version 2 . not sure if that is even what's causing the problem.
in my controller I have
Validator::make($request->all(),
['crs_img'=>"required|file|image|mimes:jpg,png,jpeg|max:5000"])->validate();
$ext = $request->file("crs_img")->getClientOriginalExtension();
$stringImageReFormat = time();
my form
<div class="form-group">
<label for="image">Upload Course Card Image </label>
<input type="file" class="" name="crs_img" id="crs_img" required>
</div>
I get an error [ file must be an image] .. though if i tried png , it goes through ! the weird thing is that the very same picture was uploaded successfully a few hours ago.
The problem also same in the "picture edit " form. only accepts whatever is not jpg.
any hints what might be the cause of this