User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Steps to reproduce:
Use Firefox's built-in screenshot function on a long page of text.
Firefox saves the screenshot as a huge JPG instead of a smaller PNG.
Firefox should ALWAYS save screenshots as PNG by default (and optionally also provide an option to save as JPG in the Save As dialog).
There is absolutely no reason for Firefox to save screenshots as JPG instead of PNG. It seems to use a bit of "dumb" decision code to decide whether it saves it as a JPG or PNG; apparently it saves as PNG by default but will switch to JPG if the resulting file is larger than a certain size (2MB? 🤔)
This is bad for numerous reasons:
1) JPG is lossy. That should be enough reason alone.
1b) People can convert from PNG to JPG but NOT the other way around.
2) JPG is NOT always smaller than PNG. If you save a big of text in JPG, it'll end up much bigger than a PNG. If you save a large page with a lot of text, the resulting JPG will end up much bigger than if it were a PNG.
3) JPGs have a lot of horrible artifacting, which is why all of those screenshots that noobs keep posting of text look horrible and waste space.
4) Using the console command :screenshot is impractical to force a save as a PNG, not just because it's hidden and inconvenient, but also because it doesn't put the page title in the filename like the normal screenshot function does.
5) You don't know how people are going to use the file, so making destructive actions like saving in a lossy format based on assumptions is terrible.
6) People will rarely post screenshots as is, they'll usually edit them, crop them, etc. and save them in whatever format they want (if they want a JPG, they'll save as JPG; they don't need you to do it for them). You shouldn't ruin things for millions of users to accommodate a small handful of users who don't know what they're doing.
6b) Editing (even cropping) JPGs could easily end up resulting in a BIGGER file than the original whereas editing PNGs would make them smaller.
7) Saving a screenshot as JPG that ends up larger than it would have as a PNG defeats the whole point that bit of "logic" in the code.
8) There's no practical reason or benefit from saving it as JPG even if it did result in a smaller file. There's no savings on bandwidth since it's a local function and not download the screenshot, and the difference in size from even a smaller JPG to PNG is negligible in most cases, especially with ever-growing SD cards. I can't imagine anyone saying that they'd rather have JPGs over PNGs to save an extra 300KB, especially since taking screenshots isn't exactly a frequent action, so it's not like people are going to have thousands of them so that 300KB adds up (and even then, it should be the USER'S CHOICE to convert it to JPG, let alone the aforementioned fact that a *lot* of screenshots can end up bigger as JPGs since webpages tend to be large swaths of plain text).
Like I said, if for some reason you MUST allow users to save directly to JPG instead of just converting it in a program or something like everybody does, then just provide that as an option in the Save As dialog, but ALWAYS default to PNG.