How to distinguish webp and jpg files

Often, when I search image in google image, right clic it to save it, files have extension jpg but it's webp files.
2020-03-26_085131
How to distinguish webp/jpg in DO ?

The WebP plugin only recognises images by extension currently. You could use a script/column that checks for the bytes you've highlighted, or which runs a file-id tool (there's a script for that on the forum, I think), but there's nothing built-in that would do it.

Can I have an example please ? I don't found it.

Not sure if there are any good examples that do similar things, but the Blob object has methods for comparing binary data in files.

ExifTool can easily set the correct extension based on the file type:

@nodeselect
exiftool.exe "-filename<%%f.${FileTypeExtension}" -@ {allfilepath|filem}
1 Like

I tried creating a button in DOpus for this, but I can't get it to work.
I open a folder in Flat View - No folders, then use this:
image

Can you please tell me what's wrong with my command? I'd rather stick to Dopus and not use ExifTool on its own.

Is exiftool.exe in your system path? If not, you'll need to use the full path to the exe.

(Put quotes around the path if it contains spaces, too.)

exiftool in in my C Drive
For ExifTool Custom Columns, my path is ('\exiftool.exe'); and that works. So, I THOUGHT the path info was ok as is..

Sorry. It's working now. I forgot I needed to select all the files first.