> I even use it when an image I saved ends up as .html for some reason and then use the info screen to determine the real extension it should be so I can rename it
If you’re on Linux on macOS, you’ll have access to the `file` command-line tool which can do it effectively. In a couple of lines of shell scripting you can even have it auto-change the extension.
I had someone try to tell me this or some similar alternative method once, but for this particular use-case my method seemed faster. Usually I'm viewing the dir with the file in ranger, hit r (shortcut for :open_with ), type mpv, enter, I in mpv for info, q to quit, a in ranger to rename the file with old name pretyped in. It's a pretty smooth workflow. Assuming I start from the same place in ranger I have to press colon and type `shell -w file %s` and hit enter which may or may not be faster but I think is more keystrokes. I could bind it to a key in ranger if I found an open one and then that might be better. It's sometimes weeks between instances of the mis-saved images or else I might've tried harder to optimize this. The shell script idea is neat.
That does no checks (e.g. is the file an image) and may not work on something on something like a video, but it’ll do for common image types such as png, jpeg, webp, heic, gif…
If you’re on Linux on macOS, you’ll have access to the `file` command-line tool which can do it effectively. In a couple of lines of shell scripting you can even have it auto-change the extension.
https://en.wikipedia.org/wiki/File_(command)