diff --git a/src/core/render/compiler/image.js b/src/core/render/compiler/image.js index 982e5e55e..e65ca2def 100644 --- a/src/core/render/compiler/image.js +++ b/src/core/render/compiler/image.js @@ -1,5 +1,5 @@ import { getAndRemoveConfig } from '../utils'; -import { isAbsolutePath, getPath, getParentPath } from '../../router/util'; +import { isAbsolutePath, getPath } from '../../router/util'; export const imageCompiler = ({ renderer, contentBase, router }) => (renderer.image = (href, title, text) => { @@ -35,7 +35,10 @@ export const imageCompiler = ({ renderer, contentBase, router }) => } if (!isAbsolutePath(href)) { - url = getPath(contentBase, getParentPath(router.getCurrentPath()), href); + url = getPath( + contentBase, + router.toURL(href, null, router.getCurrentPath()) + ); } if (attrs.length > 0) {