When Discourse detects a large enough image it triggers Client side image optimization enabled by default to optimize the image on the user device before uploading it.
This works on every device, be it mobile or desktop, except for Apple mobile devices were a series of bugs in the only browser engine allowed made we disable this feature there.