Image Supported Formats
http://image.intervention.io/getting_started/formats
The readable image formats depend on the chosen driver (GD or
Imagick) and your local configuration. By default Intervention Image
currently supports the following major formats.
JPEG PNG GIF TIF BMP ICO PSD WebP
GD ✔️ ✔️ ✔️ - - - - ✔️ *
Imagick ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ *
- For WebP support GD driver must be used with PHP 5 >= 5.5.0 or PHP 7 in order to use imagewebp(). If Imagick is used, it must be compiled with libwebp for WebP support.
See documentation of make method to see how to read image formats from different sources, respectively encode and save to learn how to output images.
NOTE: (Intervention Image is an open source PHP image handling and manipulation library
http://image.intervention.io/). This library does not validate any validation Rules, It was done by Larval
Validator class
Laravel Doc https://laravel.com/docs/5.7/validation
Tips 1: (Request validation)
$request->validate([
'title' => 'required|unique:posts|max:255',
'body' => 'required',
'publish_at' => 'nullable|date',
]);
// Retrieve the validated input data...
$validated = $request->validated(); //laravel 5.7
Tips 2: (controller validation)
$validator = Validator::make($request->all(), [
'title' => 'required|unique:posts|max:255',
'body' => 'required',
]);
if ($validator->fails()) {
return redirect('post/create')
->withErrors($validator)
->withInput();
}