diff --git a/anki/utils.py b/anki/utils.py
index 8fe0e1ee0..fb0a55973 100644
--- a/anki/utils.py
+++ b/anki/utils.py
@@ -131,7 +131,7 @@ def stripHTML(s):
def stripHTMLMedia(s):
"Strip HTML but keep media filenames"
- s = re.sub("]+)[\"']? ?/?>", " \\1 ", s)
+ s = re.sub("]+src=[\"']?([^\"'>]+)[\"']?[^>]*>", " \\1 ", s)
return stripHTML(s)
def minimizeHTML(s):