img srcset compiler error.
See original GitHub issuewhen i use
<img src="../images/card1.png" srcset="../images/card1@2x.png 2x,../images/card1@3x.png 3x" />
in .vue.
it will be compiled
<img src="dist/images/card1.png" srcset="../images/card1@2x.png 2x,../images/card1@3x.png 3x" />
.
It’s not a correct thing to do actually.It should be
<img src="dist/images/card1.png" srcset="dist/images/card1@2x.png 2x,dist/images/card1@3x.png 3x" />
.
Can add srcset compiler?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
img srcset in vue-cli project results in compile error
The error occurs because vue-loader does not handle commas in srcset filenames/URLs. It simply splits the srcset string by , , so the...
Read more >"srcset" doesn't seem to be working · Issue #396 · vuejs- ...
Here is my file structure. component > subcomponent > Example.vue component > subcomponent > assets > photo.jpg component > subcomponent ...
Read more >srcset not working? 😩 Getting Wrong Images? Let's Find ...
Sometimes, when srcset is not working and the browser is using the wrong image, it can be frustrating. This guide will help you...
Read more >Picture tag onerror handler • REPL • ...
1. <script> ; 2. window.handleImgError = function handleImgError(e, where) { ; 3. ; 4. e.target.onerror = null; ; 5. Array.from(e.target.parentNode.children).
Read more >NgOptimizedImage
The image name will be taken from ngSrc and combined with the list of width or density descriptors to generate the final srcset...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I made a PR. (#953)
Close (See the above comment URL)