Make standalone viewer cycle through .jfif files

If I double click *.jfif file, it opens in viewer. But using arrow keys or scrolling does not move me to the next file.

I found related topic (linked below) but if I understand correctly, config has no list of extensions to cycle through. I understand that you didn't make the effort to make it easier to handle video files as it's not the main purpose of standalone viewer, but now it's about images. Note that some websites I save image from use .jfif extension.

Is there any way I can make DOpus cycle through jfif files?

As long as they're actually JPEG files, JFIF files should be included in the next/previous list automatically.

If you try the same thing with .JPG files, does it work? If not then the problem isn't the extension but some other aspect of the configuration or the way the viewer is being opened.

If I convert those files to jpeg or just change the extension to .jpeg, cycling works fine.

The jfif files I'm talking about come from WhatsApp. When I or somebody else send a picture and then right-click it and choose "save image", it is saved as jfif file.

I've just reproduced this. I created a PNG file (screenshot taken with IrfanView), sent it via WhatsApp and saved the image to my disk (via context menu in Chrome). It saved as a jfif file (attached below). If I eg. clone this file 5 times and open one of them, it won't cycle. Changing extension to jpg makes it work. (2.3 KB)

How are you opening the image in the Opus viewer?

FWIW, the JFIF extension is a mistake on Chrome's part, although Google have left it this way for many years now and don't seem to care. JFIF isn't a standard extension for JPG files, and I haven't been able to find any evidence that it ever was a valid extension. It causes problems with a lot of software, including Chrome itself somewhat hilariously.

If a website doesn't specify a file extension, Chrome adds one itself, and, even for common formats that could be hardcoded like JPG, it looks them up in the registry. If the wrong extension is in the registry, Chrome uses the wrong extension, even for the most common image format on earth.

You can fix it by editing the extension under HKEY_CLASSES_ROOT\MIME\Database\Content Type\image/jpeg, but every so often some piece of software changes it back to .jfif for some reason. I'm not sure what does it.

It's also interesting to note that the HKEY_LOCAL_MACHINE version of the same data uses the proper file extension. (HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MIME\Database\Content Type\image/jpeg) That makes me suspect that the thing screwing it up isn't part of the OS, or at least isn't running with admin rights, but is a program instead. Maybe even Chrome, but I don't know.

Opus shouldn't care what the file extension is, as long as the file isn't inside an archive or other slow media (where extensions are used instead of examining actual file contents, for performance reasons). But it can depend on how the viewer is being opened, as different methods build the next/prev list differently. And it's still better to fix the registry value to stop Chrome using an invalid extension and confusing all the other software that has no idea what .jfif is.

1 Like

I changed the extension in registry and now Chrome saves files as .jpeg, which work fine when cycling. I wonder for how long the change will persist, though.

I use double click but can't figure out what is the actual command that is executed. What I already checked is that it's not overwritten by Event tab in Jpeg type, Jfif type, Images type, Recognized images, All files or All files and folders in file type dialog.

I also found out that if I change option "use internal picture viewer for: all recognized pictures" (disable checkbox or change value in dropdown), then .jpeg files are still opened and cycled correctly, while .jfif files open in Photos app. (I'm not sure if this is related but I thought that this info could help.)

Of course all the files are located on local disk.

Ah, it looks like it also depends on which file display columns are turned on. If Opus has already looked inside the files to work out things like the Width, Height or Description columns, then it will know which files are images without relying on their extensions, and that information is inherited by the viewer's next/prev list. But if that hasn't already been done then it uses extensions to build the list, for speed.

We'll add .jfif to the list of jpeg extensions, since it doesn't seem the extension or the Chrome bug it comes from is going away any time soon.

1 Like

I was using List view. Indeed, if I switch to Details view and add width column, then jfif files cycle as expected. I'd never think about this.

Anyway, thank you for looking into the matter and providing [implementing] a solution.

1 Like