AbehoM's avatar

Validate image to know if it's too vertical

I'm creating a website and I need to make the user select multiple images, as I don't have much knowledge (with Vue) and most of the Vue plugins I found isn't that great (crop, resize and allow multiple upload) I decided to go simple and validate server side if one of the image or more select is too vertical, how can I do that? Thank you.

0 likes
5 replies
AbehoM's avatar

@edoc What would it look like to check if the image is too vertical using those rules?

edoc's avatar

what do you mean by too vertical?

as you can see you can set ratios

// Ensures that the width of the image is 1.5x the height
        $this->validate($request, [
             'avatar' => 'dimensions:ratio=3/2'
        ]);

Please or to participate in this conversation.