How to Upload and Crop Image in Laravel Using imgAreaSelect and Intervention Image Library

preview_player
Показать описание
Recently one of our readers asked to write an article on upload and crop image in Laravel. In the past, we published the article on the same topic for PHP Upload, Crop and Resize Image in PHP. But when it comes to Laravel obviously we need to do some modifications as per Laravel standards.

For this tutorial, we are going to use 2 libraries – imgAreaSelect and Intervention Image.

imgAreaSelect is a jQuery plugin that allows us to implement cropping image functionality. It is a lightweight plugin and easy to use.

On the other hand, Intervention Image is a PHP image handling and manipulation library. This library helps us to create, edit and compose images.

Рекомендации по теме
Комментарии
Автор

How to validate image before saving to db?

fhejsuq
Автор

hola, error: Image source not readable, help!!

juancruzvigouroux
Автор

Thank you for fabulous video, wish if there was possibility knowing cropping area aspect ratio ( I mean size) while cropping

nageshbk
Автор

Can not download. The web is crashed????

drlucky
Автор

the website where u downloaded the areaselect files is not working

ankonbiswas
Автор

Uncaught TypeError: $(...).imgAreaSelect is not a function why getting this error while code is same to same ....please help

parveenpanchal
Автор

hello, i hope u reply this comment !


if i set width img 50%, the crop not do as i want.
if i dont set the width, the crop do as i want. do you have the solution ? thanks..

ramonivandysetiawan
Автор

Hello. How do I display an image on Laravel? And I don't mean download it. I just want to display it as a logo. Thank you.

LhtWrrr