I am trying to upload svg from laravel and it is giving this error.
The icon must be a file of type: png, svg, gif, jpeg.
This is the code of validator.
$rules = array(
'image' => 'mimes:png,gif,svg,jpeg|max:10000' // max 10000kb
);
I am trying to upload svg from laravel and it is giving this error.
The icon must be a file of type: png, svg, gif, jpeg.
This is the code of validator.
$rules = array(
'image' => 'mimes:png,gif,svg,jpeg|max:10000' // max 10000kb
);
You can use the
$rules = array(
'image' => 'image'
);
It supports jpeg, png, bmp, gif, or svg file type.
Check this for more info. https://laravel.com/docs/5.4/validation#rule-image