Closed Masterjun3 closed 1 month ago
Yes, we should be able to get naturalWidth
and naturalHeight
of the image in JS without a CORS demand.
Unfortunately the filesize IS a CORS demand so that's not an option. And we are currently checking width and height on the client size and providing an error. So we have done what we can, so closing the ticket
We currently have a policy to limit profile pictures to 125×125 pixels. But because users don't upload profile picture files to our server, it's not possible to let the server automatically check or downscale the resolution as suggested in #1711 .
Instead, we should use JavaScript to verify the new profile picture resolution on the client! This should be easy to implement and solve the problem nicely, with a verification error message to the user about how their image is too large. (Client-side verification can be circumvented of course, but that's not a problem, because we can remove wrong profile pictures manually.)