diff --git a/IPython/nbconvert/templates/html/basic.tpl b/IPython/nbconvert/templates/html/basic.tpl
index d1947db..8bc1b1a 100644
--- a/IPython/nbconvert/templates/html/basic.tpl
+++ b/IPython/nbconvert/templates/html/basic.tpl
@@ -113,7 +113,11 @@ unknown type {{ cell.type }}
{%- endblock stream_stderr %}
{% block data_svg -%}
+{%- if output.svg_filename %}
+