I will explain here how I solved this stupid problem that came up in Windows 10. Having a huge number of photographs to view, choose and edit, I decided to install the Irfanview freeware program, which I have known since Windows prehistory and had never given me problems . But with Windows 10, the story was a little different!
I decided to uninstall Irfanview after completing the above tasks, perhaps because it seems really prehistoric. The uninstallation program warned me about the return of the file associations to default and I thought everything was fine. The problem came out when I tried to re-link the image files to my preferred viewer (the old school Windows Photo Viewer). When I tried to choose "open with" and "choose another app", there was not the expected "always use this app to open .jpeg files"!
After hours of reading messages from people with the same problem to solve, I came to the conclusion that Irfanview ruins several registry keys that need to disappear quickly. The easiest way to solve this mess is to use the "File Types Man" free tool, choose the file associations that are producing this problem and right click on "open file type in RegEdit", then just delete this key and repeat the process - there will be the "always use this app to open .jpeg files". Obviously this works with any kind of files!