Add album cover to mp3 file

      2 Comments on Add album cover to mp3 file

Hi Guys, Here I am again with a new gem called FancyAudio. Any guesses what this gem might do or how to use it. Let me explain it for you.

I am one of those people who likes their mp3 files to be beautiful and clean so that I can identify a song by just looking at it’s album cover. And most of the time we have some mp3 files or lots of mp3 files which don’t have album covers. Lets see how FancyAudio can help you guys.

To use this FancyAudio gem you need to have little bit knowledge of terminal/command line. Believe me its very simple to install and use the gem.


For Developers

Gem Version
Gem source code is available on github. Any contribution is welcome.

Go ahead and type this command in your terminal. This will install FancyAudio in your system.


Ignore the warnings you see in the images. It happens when you don’t have the right permission to the files.

  1. Attach an album cover to mp3 file

    Output –

  2. Add album cover to multiple mp3 files in current directory.

    The below command will add each album-cover-image to mp3 file, provided they both share the same name. For example if there is an audio file song.mp3 then there should be a file with name song.jpg/song.jpeg/song.png . If all the mp3 files has its album-cover-image file in current directory it will add the images to all the mp3 files.

    Output –

  3. Add one album cover to multiple mp3 files

    This feature allows you to add a single image to multiple mp3 files in the same or specified directory.

    Output –

  4. Add album cover to multiple mp3 files in specified directory.This will work the same as mentioned in 2(Add album cover to multiple mp3 files) but in a specified directory instead of current directory.

    Output –

  5. To get a quick help use –h

    Output –


I hope you guys liked this gem. If you need any other feature or improvement in this gem please leave a comment below. Thanks.


2 thoughts on “Add album cover to mp3 file

  1. Keujmat

    I tried your tool. It was working fine until I try on file that have a specific format of the id3v2:

    id3v2 tag info for Avicii – BOM.mp3:
    TIT2 (Title/songname/content description): BOM
    TPE1 (Lead performer(s)/Soloist(s)): Avicii
    TYER (Year): 2010
    TKEY (Initial key): G m
    POPM (Popularimeter): ��3, counter=0 rating=0APIC (Attached picture): (image)[, 0]: image/jpg, 14228 bytes
    TPE2 (Band/orchestra/accompaniment): Avicii
    TALB (Album/Movie/Show title): Avicii – The Collection
    TCON (Content type): House (35)
    Avicii – BOM.mp3: No ID3v1 tag

    In that case fancy_audio says: Something went wrong! Or usages is incorrect

    And the same error if my mp3 doesn’t have any id3v2 tag.

    Is it possible to fix the issues ?

    Thank you so much.


Leave a Reply

Your email address will not be published. Required fields are marked *