Closed metamn closed 6 years ago
I mean I want to insert responsive images and it seems srcset
is not supported.
The following code inside a markdown file is not working:
<figure>
<img src="/static/images/styleguide-architecture_tablet.png" srcset="/static/images/styleguide-architecture_mobile.png 420w, /static/images/styleguide-architecture_tablet.png 768w, /static/images/styleguide-architecture.png 1536w" alt="Styleguide architecture">
<figcaption>Styleguide architecture</figcaption>
</figure>
And this code works (without srcset
):
<figure>
<img src="/static/images/styleguide-architecture_tablet.png" alt="Styleguide architecture">
<figcaption>Styleguide architecture</figcaption>
</figure>
That's why I would like to use an image component
Hmmm ... sorry I really don't understand the answer.
It tells me the srcset
is not supported only the src
:
CreateElement('img', { attrs: { src: require('../image.png') }})
Back to the original question ... can Vue components be used inside a markdown file?
You should upgrade vue-loader
to ^13.0.0
. See https://github.com/vuejs/vue-loader/commit/69fd7b02fbf8eeeac8513420364db6d8b65946bb
oh thanks :D
Thank you for the plugin!
Is there a way to have Vue components inside the markdown file?
Thanks again!