diff --git a/src/core/render/compiler/image.js b/src/core/render/compiler/image.js
index 76e05ed26..3cc48c360 100644
--- a/src/core/render/compiler/image.js
+++ b/src/core/render/compiler/image.js
@@ -1,4 +1,4 @@
-import { getAndRemoveConfig } from '../compiler';
+import { getAndRemoveConfig } from '../utils';
import { isAbsolutePath, getPath, getParentPath } from '../../router/util';
export const imageCompiler = ({ renderer, contentBase, router }) =>
@@ -38,7 +38,11 @@ export const imageCompiler = ({ renderer, contentBase, router }) =>
url = getPath(contentBase, getParentPath(router.getCurrentPath()), href);
}
- return `
`;
+ if (attrs.length > 0) {
+ return `
`;
+ }
+
+ return `
`;
});