BookStack\Http\Controllers\ImageController::getThumbnail PHP Method

getThumbnail() public method

Generate a sized thumbnail for an image.
public getThumbnail ( $id, $width, $height, $crop ) : Illuminate\Http\JsonResponse
$id
$width
$height
$crop
return Illuminate\Http\JsonResponse
    public function getThumbnail($id, $width, $height, $crop)
    {
        $this->checkPermission('image-create-all');
        $image = $this->imageRepo->getById($id);
        $thumbnailUrl = $this->imageRepo->getThumbnail($image, $width, $height, $crop == 'false');
        return response()->json(['url' => $thumbnailUrl]);
    }