Python 3.7.3 で動作確認
import mutagen
from io import BytesIO
from PIL import Image
# ファイル名は適宜変更してください
file = r"example.mp3"
# ファイル読み込み
audio = mutagen.File(file)
# 画像のリストを取得
if 'audio/mp3' in audio.mime:
images = [audio[i] for i in audio if "APIC" in i]
elif 'audio/flac' in audio.mime:
images = audio.pictures
for imgb in images:
# 画像を表示用に変換
img = Image.open(BytesIO(imgb.data))
img.show()
検索しても画像を新たに埋め込む記事ばかりで、埋め込み画像を表示する記事が見つけられなかったから書いてみました。
"APIC" == i ではなく "APIC" in i としたのは、
Mp3tagで埋め込んだ画像のキーが "APIC:" となっていたから。
テキトーに書いたから最適なコードではないかも。