@@ -736,15 +736,9 @@ ppTopElement = ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ++) . unEntity .
736736 unEntity (x:xs) = x : unEntity xs
737737
738738imageTypeOf :: FilePath -> Maybe String
739−imageTypeOf x = case drop 1 (map toLower (takeExtension x)) of
740− "jpg" -> Just "image/jpeg"
741− "jpeg" -> Just "image/jpeg"
742− "jfif" -> Just "image/jpeg"
743− "png" -> Just "image/png"
744− "gif" -> Just "image/gif"
745− "svg" -> Just "image/svg+xml"
746− _ -> Nothing
747−
739+imageTypeOf x = case getMimeType x of
740+ Just y@('i':'m':'a':'g':'e':_) -> Just y
741+ _ -> Nothing
748742
749743data IdentState = IdentState{
750744 chapterNumber :: Int,