wmiriye .miriye
wmiriye .miriye

Reputation: 1

Laravel 8 Image Crop Upload dimension restrictions

I have seen a lot of tutorials on cropping images before uploading them in Laravel. My issues is that I do not want the users to decide the dimensions of the image before they upload. I want to set the default dimensions so that all the user does is drag around which areas of the image they want to crop with the dimensions I have set for them.

Any JS package that allows me to do this easily?

Upvotes: -1

Views: 202

Answers (1)

Eric Qvarnström
Eric Qvarnström

Reputation: 982

I had the same problem as you earlier, and solved it using a javascript package named CropperJs.

Cropper allows you to set a fixed image-ratio that the user can not change. See this thread on how to implement the fixed ratio using CropperJs :)

Good luck!

Upvotes: 0

Related Questions