Audio with .JPG image – I'd like to extract the .jpg images in lowercase. Is this possible?

Hello everyone,

I sometimes receive audio files with a .JPG image. When I upload the .JPG image to my server, there's a conflict, and the image doesn't appear on the website.

When I use the Action command in Mp3tag, can I program a formula to get:

Artist-Album.jpg (Lowercase jpg)

As far as I understand you, you have these JPG-covers embedded in the file and want to extract them to a file.

You can do this manually with a right mouse click on the embedded picture and select "Extract Cover". The file will be saved with the scheme you have defined in Options->Tag sources->Default file name for cover art. The scheme has to be %artist%-%album%

You can also do it with an action of the type "Export cover to file" and the same scheme for "Format string for image filename".

You could expand this format string to
$lower(%artist%-%album%)

Yes, that's correct. %artist%-%album%

I used @ohrenkino's formula:
$lower(%artist%-%album%)
I tested it with the Actions command, as @poster told me, and it works very well.

I programmed the command in Actions (Quick), using the same formula, and it also works very well.

Thanks to @poster and @ohrenkino for the formula. :+1:

I ran the test very quickly, without paying attention to the full text.

At the beginning:
Johnny Cash-Album American II Unchained (1996).JPG

With the formula
johnny cash-album american ii unchained (1996).jpg

I notice that all the text is in lowercase. Is it possible, @ohrenkino, to have a formula for the lowercase JPG only?

Do you only want the three characters in the file extension (e.g. jpg) to be in lowercase?
The other text should remain untouched?

Yes @LyricsLover, that's exactly it...

The suffix (jpg) is always in lower case, when you export en embedded image. Therefore you just have to use the format string in my answer (without $lower()).

Hello @poster

I tested this formula and it didn't work
(without $lower()).

How to write the formula correctly with the following data?

%artist%-%album%
(without $lower()).


Don't use anything with $lower()... in this case
As Format string only use:
%artist%-%album%

Hello @LyricsLover, yes, that's the formula I use.

%artist%-%album%

I have images that are extracted with

Artist-Album.JPG

If I understand correctly, there's no formula that could only lowercase the .JPG data

If you use the above Action "Export cover to file" with the above Format string
%artist%-%album%
you get the extension jpg in lowercase.
No special treatement is necessary. Just try it.

If you use another way to extract the cover picture - like drag & drop? - then you have to set the same Format string
in File -> Options -> Tag Sources -> "Default filename for cover art":
%artist%-%album%


and you get the extension jpg in lowercase.

Or do you already have cover file names with an uppercase JPG extension?
How did you export them?

Which program have you used to get a cover filename with uppercase JPG extension?

Do you mean you get a separated cover image file with an uppercase JPG extension in addition to your audio file?

Hello @LyricsLover, I've programmed my Mp3tag. Since using this program, see my image.

Tag Sources
%artist%-%album%

When I receive MP3 audio files, the image is always included in the audio file, and Mp3tag doesn't automatically lowercase .JPG...

It's possible to get an uppercase image file extension like JPG if the mimetype of the embedded image is something like image/JPG instead of image/jpeg.

For unknown mimetypes, I'm trying to derive the file extension from the part after image/ (if this fails, I'm trying to inspect the image data to identify the file type).

For the cases where the image file extension is derived from the part after image/, it's currently not possible to manipulate the file extension, e.g., change to lowercase.

As a test you can add a new column to the File List with these properties:


Then you can see what @Florian means with mimetype for your embedded cover image in your audio files.

In my test case it looks like this for my 10 audio files with embedded covers:


How does it look for you and audio files with embedded cover image files that gets exported with uppercase JPG?

If it is really important to have all .JPG extensions in lowercase, you can use a Windows-CMD-Batchfile like this and rename all the .JPG with a double click:
for %%F in (*.JPG) do ren "%%F" "%%~nF.jpg"

This would rename all *.JPG into *.jpg in the same directory as the CMD-Batchfile.
Just copy & paste the above line into a new empty CMD-Batch with a name like Rename_JPG_Extension_in_lowercase.cmd

Thanks @Florian for your explanation, I'm starting to understand better.

& thanks @LyricsLover for the MIME command. I didn't understand this command. It's really cool. Finally, I can see my images/JPGs before extracting them.

Here's my data, see my image:
Mp3tag MIME command (by Florian, example image by LyricsLover)

Thanks @LyricsLover for the info, I'll do some tests...

Just for the record:
The official standard for mimetypes lists nearly all image types in lowercase:

There are currently only 2 exotic image formats with an uppercase letter in the mimetype

.jxrA    	image/jxrA
.jxrS    	image/jxrS

All well known image formats like

image/bmp
image/gif
image/jpeg
image/png
image/tiff
image/webp

are listed in all-lowercase letters.
image/JPG deviates from the official standard.

Thanks @LyricsLover for this info, I'm surprised by this, there are legal music platforms that use audio files with .JPG images