diff --git a/stardict.cc b/stardict.cc
index ddcd50d3..c27ddaa1 100644
--- a/stardict.cc
+++ b/stardict.cc
@@ -336,7 +336,7 @@ string StardictDictionary::handleResource( char type, char const * resource, siz
string articleText = "
" + string( resource, size ) + "
";
return ( QString::fromUtf8( articleText.c_str() )
- .replace( QRegExp( "(<\\s*img\\s+[^>]*src\\s*=\\s*[\"']*)([^\"']*)", Qt::CaseInsensitive ),
+ .replace( QRegExp( "(<\\s*img\\s+[^>]*src\\s*=\\s*[\"']+)((?!data:)[^\"']*)", Qt::CaseInsensitive ),
"\\1bres://" + QString::fromStdString( getId() ) + "/\\2" )
.toUtf8().data() );
}