Since 2019 X keeps the original JPEG bytes for web uploads that fit its limits (under 5 MB and 4096 px), so a well-encoded file arrives untouched. Uploads that break a rule are re-encoded at roughly 85% quality. In the mobile apps, turn on Settings › Accessibility, display and languages › Data usage › High-quality image uploads to avoid the extra downscale.
Photos display uncropped between 2:1 and 3:4 in the timeline; anything taller is cropped in the preview. 16:9 (1200×675) fills the timeline card; 4:5 gives more height on phones.