An odd quest perhaps: but adding album art to an MP3 (in ID3 tags) is readily doable with the KTaglib extension for PHP. Once you have it, you can use a script like this to add artwork to an MP3:
$mp3 = new KTaglib_MPEG_File('2.mp3');
$idv2 = $mp3->getID3v2Tag(true);
$album = new KTaglib_ID3v2_AttachedPictureFrame();
$album->setType(KTaglib_ID3v2_AttachedPictureFrame::FrontCover);
$album->setPicture('testalbum.jpg');
$album->setMimeType('image/jpeg');
$idv2->addFrame($album);
$mp3->save();
Assuming no exceptions are thrown, this should allow you to set an image of your choosing as a FrontCover image (of course replacing my example values with your own real values), consult the KTaglib documentation for more details and check “Predefined Constants” for the other image types.
No related posts.