summaryrefslogtreecommitdiff
path: root/sphinx/environment/collectors/asset.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/environment/collectors/asset.py')
-rw-r--r--sphinx/environment/collectors/asset.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sphinx/environment/collectors/asset.py b/sphinx/environment/collectors/asset.py
index a0c009463..572dea7a4 100644
--- a/sphinx/environment/collectors/asset.py
+++ b/sphinx/environment/collectors/asset.py
@@ -100,6 +100,9 @@ class ImageCollector(EnvironmentCollector):
filename)
try:
mimetype = guess_mimetype(filename)
+ if mimetype is None:
+ basename, suffix = path.splitext(filename)
+ mimetype = 'image/x-' + suffix[1:]
if mimetype not in candidates:
globbed.setdefault(mimetype, []).append(new_imgpath)
except OSError as err: