tasvideos icon indicating copy to clipboard operation
tasvideos copied to clipboard

Implement profile picture resolution verification

Open Masterjun3 opened this issue 1 year ago • 1 comments

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.)

Masterjun3 avatar Jan 04 '24 13:01 Masterjun3

Yes, we should be able to get naturalWidth and naturalHeight of the image in JS without a CORS demand.

nattthebear avatar Jan 05 '24 00:01 nattthebear

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

adelikat avatar Jun 05 '24 00:06 adelikat