diff --git a/libavformat/img2.c b/libavformat/img2.c
index 962265e4c19819addc0933da45ddb09d4c06bfe5..a3dcce741a1bf106c2e16b073a61219d510aaef5 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -45,6 +45,7 @@ static const IdStrMap img_tags[] = {
     { CODEC_ID_PNG       , "png"},
     { CODEC_ID_PNG       , "mng"},
     { CODEC_ID_PPM       , "ppm"},
+    { CODEC_ID_PPM       , "pnm"},
     { CODEC_ID_PGM       , "pgm"},
     { CODEC_ID_PGMYUV    , "pgmyuv"},
     { CODEC_ID_PBM       , "pbm"},