diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,38 @@
+## 0.1.2.2
+
+* Add IANA registered `image/avif` type for `.avif` images. [#1059](https://github.com/yesodweb/wai/pull/1059)
+
+## 0.1.2.1
+
+* Change type for JavaScript files to `text/javascript` [#1051](https://github.com/yesodweb/wai/pull/1051)
+
+## 0.1.2.0
+
+* Added `defaultExtensionMap` to provide the inverse of `defaultMimeMap`.
+
+See PR [#930](https://github.com/yesodweb/wai/pull/930) and [#948](https://github.com/yesodweb/wai/pull/948).
+
+## 0.1.1.0
+
+* Replace `audio/x-mpegurl` with IANA registered type
+  `application/vnd.apple.mpegurl`.
+* Add TeX-related types; this includes `bib`, `tex`, `sty`, and `cls`.
+* Use type image/x-xcf for `.xcf` files.
+* Use type "audio/opus" for `.opus` files.
+* Add type text/vtt for `.vtt` text track files.
+* Use IANA registered type "application/vnd.rar" for `.rar` files.
+* Use font types defined in RFC 8081.
+* Replace `audio/x-m4a` with `audio/mp4`.
+* Change mime type for `.exe` files; use IANA registered type
+  `application/vnd.microsoft.portable-executable`.
+* Add `video/dv` for files with extension `dv`.
+* Use 'application/xml' instead of 'text/xml'.
+* Change type for `.pcx` files to `image/vnd.zbrush.pcx`.
+* Use `text/markdown` type for `.md` and `.markdown` files.
+* Replace `application/x-gzip` with type `application/gzip`.
+
+See PR [#906](https://github.com/yesodweb/wai/pull/906).
+
 ## 0.1.0.9
 
 * Add mjs mime type
diff --git a/Network/Mime.hs b/Network/Mime.hs
--- a/Network/Mime.hs
+++ b/Network/Mime.hs
@@ -1,29 +1,42 @@
 {-# LANGUAGE OverloadedStrings #-}
-module Network.Mime
-    ( -- * Lookups
-      mimeByExt
-    , defaultMimeLookup
-      -- * Defaults
-    , defaultMimeType
-    , defaultMimeMap
-      -- * Utilities
-    , fileNameExtensions
-      -- * Types
-    , FileName
-    , MimeType
-    , MimeMap
-    , Extension
-    ) where
 
-import Data.Text (Text)
-import qualified Data.Text as T
+module Network.Mime (
+    -- * Lookups
+    mimeByExt,
+    defaultMimeLookup,
+
+    -- * Defaults
+    defaultMimeType,
+    defaultMimeMap,
+    defaultExtensionMap,
+
+    -- * Utilities
+    fileNameExtensions,
+
+    -- * Types
+    FileName,
+    MimeType,
+    MimeMap,
+    Extension,
+    ExtensionMap,
+) where
+
 import Data.ByteString (ByteString)
 import Data.ByteString.Char8 ()
+import qualified Data.List as L
 import qualified Data.Map as Map
+import Data.Text (Text)
+import qualified Data.Text as T
 
 -- | Maps extensions to mime types.
 type MimeMap = Map.Map Extension MimeType
 
+-- | Maps mime types to extensions.
+-- The list of extensions is in alphabetical order.
+--
+-- @since 0.1.2.0
+type ExtensionMap = Map.Map MimeType [Extension]
+
 -- | The filename component of a filepath, leaving off the directory but
 -- keeping all extensions.
 type FileName = Text
@@ -32,15 +45,17 @@
 type MimeType = ByteString
 
 -- | Look up a mime type from the given mime map and default mime type.
-mimeByExt :: MimeMap
-          -> MimeType -- ^ default mime type
-          -> FileName
-          -> MimeType
+mimeByExt
+    :: MimeMap
+    -> MimeType
+    -- ^ default mime type
+    -> FileName
+    -> MimeType
 mimeByExt mm def =
     go . fileNameExtensions
   where
     go [] = def
-    go (e:es) =
+    go (e : es) =
         case Map.lookup e mm of
             Nothing -> go es
             Just mt -> mt
@@ -75,8 +90,23 @@
 --
 -- Generated from the Apache and nginx mime.types files.
 defaultMimeMap :: MimeMap
-defaultMimeMap = Map.fromAscList [
-      ("123", "application/vnd.lotus-1-2-3")
+defaultMimeMap = Map.fromAscList mimeAscList
+
+-- | A mapping of 'MimeType' to a set of 'Extension's.
+--
+-- @since 0.1.2.0
+defaultExtensionMap :: ExtensionMap
+defaultExtensionMap =
+    L.foldr go mempty mimeAscList
+  where
+    go (ext, mimeType) =
+        Map.alter (Just . maybe [ext] (ext :)) mimeType
+
+-- | Find the current table in IANA media-types registry
+-- https://www.iana.org/assignments/media-types/media-types.xhtml
+mimeAscList :: [(Extension, MimeType)]
+mimeAscList =
+    [ ("123", "application/vnd.lotus-1-2-3")
     , ("3dml", "text/vnd.in3d.3dml")
     , ("3ds", "image/x-3ds")
     , ("3g2", "video/3gpp2")
@@ -122,6 +152,7 @@
     , ("atx", "application/vnd.antix.game-component")
     , ("au", "audio/basic")
     , ("avi", "video/x-msvideo")
+    , ("avif", "image/avif")
     , ("aw", "application/applixware")
     , ("azf", "application/vnd.airzip.filesecure.azf")
     , ("azs", "application/vnd.airzip.filesecure.azs")
@@ -132,6 +163,7 @@
     , ("bdm", "application/vnd.syncml.dm+wbxml")
     , ("bed", "application/vnd.realvnc.bed")
     , ("bh2", "application/vnd.fujitsu.oasysprs")
+    , ("bib", "application/x-bibtex")
     , ("bin", "application/octet-stream")
     , ("blb", "application/x-blorb")
     , ("blorb", "application/x-blorb")
@@ -194,6 +226,7 @@
     , ("clkw", "application/vnd.crick.clicker.wordbank")
     , ("clkx", "application/vnd.crick.clicker")
     , ("clp", "application/x-msclip")
+    , ("cls", "application/x-tex")
     , ("cmc", "application/vnd.cosmocaller")
     , ("cmdf", "chemical/x-cmdf")
     , ("cml", "chemical/x-cml")
@@ -250,10 +283,16 @@
     , ("dna", "application/vnd.dna")
     , ("doc", "application/msword")
     , ("docm", "application/vnd.ms-word.document.macroenabled.12")
-    , ("docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document")
+    ,
+        ( "docx"
+        , "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
+        )
     , ("dot", "application/msword")
     , ("dotm", "application/vnd.ms-word.template.macroenabled.12")
-    , ("dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template")
+    ,
+        ( "dotx"
+        , "application/vnd.openxmlformats-officedocument.wordprocessingml.template"
+        )
     , ("dp", "application/vnd.osgi.dp")
     , ("dpg", "application/vnd.dpgraph")
     , ("dra", "audio/vnd.dra")
@@ -264,6 +303,7 @@
     , ("dts", "audio/vnd.dts")
     , ("dtshd", "audio/vnd.dts.hd")
     , ("dump", "application/octet-stream")
+    , ("dv", "video/dv")
     , ("dvb", "video/vnd.dvb.file")
     , ("dvi", "application/x-dvi")
     , ("dwf", "model/vnd.dwf")
@@ -296,7 +336,7 @@
     , ("etx", "text/x-setext")
     , ("eva", "application/x-eva")
     , ("evy", "application/x-envoy")
-    , ("exe", "application/x-msdownload")
+    , ("exe", "application/vnd.microsoft.portable-executable")
     , ("exi", "application/exi")
     , ("ext", "application/vnd.novadigm.ext")
     , ("ez", "application/andrew-inset")
@@ -349,6 +389,7 @@
     , ("gdl", "model/vnd.gdl")
     , ("geo", "application/vnd.dynageo")
     , ("gex", "application/vnd.geometry-explorer")
+    , ("gf", "application/x-tex-gf")
     , ("ggb", "application/vnd.geogebra.file")
     , ("ggt", "application/vnd.geogebra.tool")
     , ("ghf", "application/vnd.groove-help")
@@ -373,7 +414,7 @@
     , ("gv", "text/vnd.graphviz")
     , ("gxf", "application/gxf")
     , ("gxt", "application/vnd.geonext")
-    , ("gz", "application/x-gzip")
+    , ("gz", "application/gzip")
     , ("h", "text/x-c")
     , ("h261", "video/h261")
     , ("h263", "video/h263")
@@ -442,7 +483,7 @@
     , ("jpgm", "video/jpm")
     , ("jpgv", "video/jpeg")
     , ("jpm", "video/jpm")
-    , ("js", "application/javascript")
+    , ("js", "text/javascript")
     , ("json", "application/json")
     , ("jsonml", "application/jsonml+json")
     , ("kar", "audio/midi")
@@ -468,11 +509,9 @@
     , ("lbd", "application/vnd.llamagraphics.life-balance.desktop")
     , ("lbe", "application/vnd.llamagraphics.life-balance.exchange+xml")
     , ("les", "application/vnd.hhe.lesson-player")
-
-    -- Added after deliberation in PR (https://github.com/yesodweb/wai/pull/534)
-    -- Accepted mainly because of StackOverflow (http://stackoverflow.com/questions/7319555/how-to-add-less-to-iis-7-0)
-    , ("less", "text/css")
-    
+    , -- Added after deliberation in PR (https://github.com/yesodweb/wai/pull/534)
+      -- Accepted mainly because of StackOverflow (http://stackoverflow.com/questions/7319555/how-to-add-less-to-iis-7-0)
+      ("less", "text/css")
     , ("lha", "application/x-lzh-compressed")
     , ("link66", "application/vnd.route66.link66+xml")
     , ("list", "text/plain")
@@ -484,6 +523,7 @@
     , ("lrf", "application/octet-stream")
     , ("lrm", "application/vnd.ms-lrm")
     , ("ltf", "application/vnd.frogans.ltf")
+    , ("ltx", "application/x-tex")
     , ("lvp", "audio/vnd.lucent.voice")
     , ("lwp", "application/vnd.lotus-wordpro")
     , ("lzh", "application/x-lzh-compressed")
@@ -494,9 +534,9 @@
     , ("m2a", "audio/mpeg")
     , ("m2v", "video/mpeg")
     , ("m3a", "audio/mpeg")
-    , ("m3u", "audio/x-mpegurl")
+    , ("m3u", "application/vnd.apple.mpegurl")
     , ("m3u8", "application/vnd.apple.mpegurl")
-    , ("m4a", "audio/x-m4a")
+    , ("m4a", "audio/mp4")
     , ("m4u", "video/vnd.mpegurl")
     , ("m4v", "video/x-m4v")
     , ("ma", "application/mathematica")
@@ -506,6 +546,7 @@
     , ("man", "text/troff")
     , ("manifest", "text/cache-manifest")
     , ("mar", "application/octet-stream")
+    , ("markdown", "text/markdown")
     , ("mathml", "application/mathml+xml")
     , ("mb", "application/mathematica")
     , ("mbk", "application/vnd.mobius.mbk")
@@ -513,6 +554,7 @@
     , ("mc1", "application/vnd.medcalcdata")
     , ("mcd", "application/vnd.mcd")
     , ("mcurl", "text/vnd.curl.mcurl")
+    , ("md", "text/markdown")
     , ("mdb", "application/x-msaccess")
     , ("mdi", "image/vnd.ms-modi")
     , ("me", "text/troff")
@@ -531,7 +573,7 @@
     , ("mime", "message/rfc822")
     , ("mj2", "video/mj2")
     , ("mjp2", "video/mj2")
-    , ("mjs", "application/javascript")
+    , ("mjs", "text/javascript")
     , ("mk3d", "video/x-matroska")
     , ("mka", "audio/x-matroska")
     , ("mks", "video/x-matroska")
@@ -638,11 +680,12 @@
     , ("opf", "application/oebps-package+xml")
     , ("opml", "text/x-opml")
     , ("oprc", "application/vnd.palm")
+    , ("opus", "audio/opus")
     , ("org", "application/vnd.lotus-organizer")
     , ("osf", "application/vnd.yamaha.openscoreformat")
     , ("osfpvg", "application/vnd.yamaha.openscoreformat.osfpvg+xml")
     , ("otc", "application/vnd.oasis.opendocument.chart-template")
-    , ("otf", "application/x-font-otf")
+    , ("otf", "font/otf")
     , ("otg", "application/vnd.oasis.opendocument.graphics-template")
     , ("oth", "application/vnd.oasis.opendocument.text-web")
     , ("oti", "application/vnd.oasis.opendocument.image-template")
@@ -671,7 +714,7 @@
     , ("pclxl", "application/vnd.hp-pclxl")
     , ("pct", "image/x-pict")
     , ("pcurl", "application/vnd.curl.pcurl")
-    , ("pcx", "image/x-pcx")
+    , ("pcx", "image/vnd.zbrush.pcx")
     , ("pdb", "application/vnd.palm")
     , ("pdf", "application/pdf")
     , ("pem", "application/x-x509-ca-cert")
@@ -699,16 +742,25 @@
     , ("portpkg", "application/vnd.macports.portpkg")
     , ("pot", "application/vnd.ms-powerpoint")
     , ("potm", "application/vnd.ms-powerpoint.template.macroenabled.12")
-    , ("potx", "application/vnd.openxmlformats-officedocument.presentationml.template")
+    ,
+        ( "potx"
+        , "application/vnd.openxmlformats-officedocument.presentationml.template"
+        )
     , ("ppam", "application/vnd.ms-powerpoint.addin.macroenabled.12")
     , ("ppd", "application/vnd.cups-ppd")
     , ("ppm", "image/x-portable-pixmap")
     , ("pps", "application/vnd.ms-powerpoint")
     , ("ppsm", "application/vnd.ms-powerpoint.slideshow.macroenabled.12")
-    , ("ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow")
+    ,
+        ( "ppsx"
+        , "application/vnd.openxmlformats-officedocument.presentationml.slideshow"
+        )
     , ("ppt", "application/vnd.ms-powerpoint")
     , ("pptm", "application/vnd.ms-powerpoint.presentation.macroenabled.12")
-    , ("pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation")
+    ,
+        ( "pptx"
+        , "application/vnd.openxmlformats-officedocument.presentationml.presentation"
+        )
     , ("pqa", "application/vnd.palm")
     , ("prc", "application/x-mobipocket-ebook")
     , ("pre", "application/vnd.lotus-freelance")
@@ -737,7 +789,7 @@
     , ("qxt", "application/vnd.quark.quarkxpress")
     , ("ra", "audio/x-pn-realaudio")
     , ("ram", "audio/x-pn-realaudio")
-    , ("rar", "application/x-rar-compressed")
+    , ("rar", "application/vnd.rar")
     , ("ras", "image/x-cmu-raster")
     , ("rcprofile", "application/vnd.ipunplugged.rcprofile")
     , ("rdf", "application/rdf+xml")
@@ -856,6 +908,7 @@
     , ("stl", "application/vnd.ms-pki.stl")
     , ("str", "application/vnd.pg.format")
     , ("stw", "application/vnd.sun.xml.writer.template")
+    , ("sty", "application/x-tex")
     , ("sub", "text/vnd.dvb.subtitle")
     , ("sus", "application/vnd.sus-calendar")
     , ("susp", "application/vnd.sus-calendar")
@@ -908,8 +961,8 @@
     , ("trm", "application/x-msterminal")
     , ("tsd", "application/timestamped-data")
     , ("tsv", "text/tab-separated-values")
-    , ("ttc", "application/x-font-ttf")
-    , ("ttf", "application/x-font-ttf")
+    , ("ttc", "font/ttf")
+    , ("ttf", "font/ttf")
     , ("ttl", "text/turtle")
     , ("twd", "application/vnd.simtech-mindmapper")
     , ("twds", "application/vnd.simtech-mindmapper")
@@ -975,6 +1028,7 @@
     , ("vss", "application/vnd.visio")
     , ("vst", "application/vnd.visio")
     , ("vsw", "application/vnd.visio")
+    , ("vtt", "text/vtt")
     , ("vtu", "model/vnd.vtu")
     , ("vxml", "application/voicexml+xml")
     , ("w3d", "application/x-director")
@@ -1006,8 +1060,8 @@
     , ("wmv", "video/x-ms-wmv")
     , ("wmx", "video/x-ms-wmx")
     , ("wmz", "application/x-msmetafile")
-    , ("woff", "application/font-woff")
-    , ("woff2", "application/font-woff2")
+    , ("woff", "font/woff")
+    , ("woff2", "font/woff2")
     , ("wpd", "application/vnd.wordperfect")
     , ("wpl", "application/vnd.ms-wpl")
     , ("wps", "application/vnd.ms-works")
@@ -1031,6 +1085,7 @@
     , ("xbap", "application/x-ms-xbap")
     , ("xbd", "application/vnd.fujixerox.docuworks.binder")
     , ("xbm", "image/x-xbitmap")
+    , ("xcf", "image/x-xcf")
     , ("xdf", "application/xcap-diff+xml")
     , ("xdm", "application/vnd.syncml.dm+xml")
     , ("xdp", "application/vnd.adobe.xdp+xml")
@@ -1058,7 +1113,7 @@
     , ("xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template")
     , ("xlw", "application/vnd.ms-excel")
     , ("xm", "audio/xm")
-    , ("xml", "text/xml")
+    , ("xml", "application/xml")
     , ("xo", "application/vnd.olpc-sugar")
     , ("xop", "application/xop+xml")
     , ("xpi", "application/x-xpinstall")
diff --git a/mime-types.cabal b/mime-types.cabal
--- a/mime-types.cabal
+++ b/mime-types.cabal
@@ -1,5 +1,5 @@
 name:                mime-types
-version:             0.1.0.9
+version:             0.1.2.2
 synopsis:            Basic mime-type handling types and functions
 description:         API docs and the README are available at <http://www.stackage.org/package/mime-types>.
 homepage:            https://github.com/yesodweb/wai
@@ -9,16 +9,18 @@
 maintainer:          michael@snoyman.com
 category:            Web
 build-type:          Simple
-cabal-version:       >=1.8
+cabal-version:       >=1.10
 extra-source-files:  README.md ChangeLog.md
 
 library
   exposed-modules:     Network.Mime
-  build-depends:       base           >= 4      && < 5
+  default-language:    Haskell2010
+  build-depends:       base           >= 4.12   && < 5
                      , containers
                      , text
                      , bytestring
 
 source-repository head
   type:     git
-  location: git://github.com/yesodweb/wai.git
+  location: https://github.com/yesodweb/wai.git
+  subdir:   mime-types
