you said
User uses the editor to select a part of the image, applies filters, rotate flip.... and so on,
so eg, filters can only be done client side and then sending the server the revised image
This is a question about best approach. Quick overview is user uploads image, now the site has an online editor so the uploaded image is the source and remains untouched. User uses the editor to select a part of the image, applies filters, rotate flip.... and so on, those details get sent to laravel and creates an image from the source.
And there is no preview on the upload function, and not what is wanted for this implementation
Now I have done this in either of 2 ways
So assume image has been uploaded, and user decides they want to edit it.
Scenario 1: User opens editor, makes changes -> Send crop data (x , y width, height coordinates only) and in the back end pull image from storage, make the new image from the sourced original and save the new image
Scenario 2: User make changes and send the base64 image, pre-cropped string to laravel and simply create an image and store it.
I have both ways working and each with its own set of pros and cons.
But curious what in your opinion makes more sense?
Scenario 1 seems more secure in terms that the uploaded image is the source and already verified as image / mime and trust worthy source, but pulling the image from storage takes a little longer, yet the user is only sending crop coordinates (small amount of data)
Scenario 2 the user is doing the majority of the work but also if on mobile using a qood chunk of data sending the base64 to the site
Any insight as to your approach, and why?
Thanks
Please or to participate in this conversation.