Context
When I upload a screenshot, it appears larger than the original size.
Discovery
By default, firefox adjusts device pixel sizes using your OS's display scaling.
Other screenshot tools on linux do the same.
With mine set to 125%, the screenshots are getting enlarged by that amount.
There is a setting, layout.css.devPixelsPerPx, defaulting to -1.
Setting this to 1 will ignore device scaling, but sites will be scaled down.
Another suggestion was to use the responsive preview with scaled down dpr, but this did not work.
Firefox console screenshot command
Firefox has a console command for screenshots: :screenshot --dpr 1.
This takes a full screenshot of the viewport.
Use --fullpage to get the entire page, or --selector for an element.
There is a bug for some selectors not working: https://bugzilla.mozilla.org/show_bug.cgi?id=1482807
More firefox screenshot bugs: https://bugzilla.mozilla.org/showdependencytree.cgi?id=1483143&hide_resolved=1
Analysis
This appears to be a widespread issue with OS screen scaling, and how applications use them.
The most reliable fix is to set the display scaling to 100% before taking screenshots.
Done
Added UI Scaler for HiDPI screens applet for faster switching.
Added CKEditor Media Edit, and Media Entity File Replace modules to help replace files in ckeditor media.
TODO
Adjust existing screenshots.
Test again with wayland or future versions of linux mint.