i don't think this is something will happen, i'll give it some mind when i redo the avatar uploading process but it will definitely not happen for attached file uploads aside from maybe thumbnail generation or as-lossless-as-possible conversion between formats for e.g. avif/webp -> jpg/png. i personally find it important that the file i attach to my post/message is what i uploaded, with too many websites crunching images up, not to mention added load on the servers... granted a lot can be offloaded to the client nowadays, i've been keeping an eye on the availability of
the web VideoEncoder API, but even if that came out i'd still not be very sure where that'd come in...
tl;dr compression/ensuring correct filesize is for the uploader to take care of, [wontfix]