Handling user images in a web app - format, rotate?
everyone, in my web app (Python - Django) users should be able to upload pictures in the future, which will then be displayed in their own profile (like a Facebook picture post).
Accordingly, there will be a file input in which the user can select his image. The image must then be displayed directly, as the user may want to upload several images.
Since I'm not familiar with image editing, I'm asking myself a few questions.
Currently I send the image to my server via Ajax, compress it and scale it to 400x400 px. if the picture doesn't fit the format, i crop it accordingly, certainly not the prettiest option, because if it doesn't fit, i crop from the middle. Then I save the image, and return the URL and render it.
Everything works as desired, I'm just not sure if it's really good.
For example, how do I deal with images in landscape format? How do I let the user rotate the picture? For this I would have to save it unchanged, render it and then ask the user? How can I open the "Open camera" function for smartphones? Is this possible in a "normal" mobile website version (or am I planning to switch to PWA)?
What does a normal process look like in a case like this?
I'm grateful for any help :)