I'm sorry in advance for such a general question, but I'm having a hard time getting it answered by google alone. Perhaps I'm not asking the right question?
Here's what I need to do:
- Need to fetch an image from an external API.
- Visually crop and resize the image.
- Save transformed image to DB.
I was looking at some js libraries such as jcrop, Croppie, and cropperjs, but all of those only let me manually upload the images. I'm wondering if there is a solution for this already? Or perhaps someone has done this before and is willing to share their solution?
I'm doing this in Laravel btw, and all of this will be performed in the backend only.
Thanks.
For downloading an image from url you can use curl directly:
Or you can use a package like Intervention: