[Vuetify] Image load failed
See original GitHub issueHi, I’m using a Vue Cli 3 template with Vuetify, and Vuetify loader, but when trying to use a progressive image i get the following error:
<VImg src="@/assets/img/home/mac-left.jpg" />
gives this error.
I know the location is correct, because if i change to <img src="@/assets/img/home/mac-left.jpg" />
the image works properly, so it has something to do with the loader.
Here’s the vue.config.js
, which should resolve to the correct webpack config.
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin');
const { VuetifyProgressiveModule } = require('vuetify-loader');
module.exports = {
chainWebpack: config => {
config.resolve.alias
.set('vuetify/lib', 'vuetify/es5/components');
config.plugin('vuetify-loader')
.use(VuetifyLoaderPlugin);
config.module
.rule('vue')
.use('vue-loader')
.loader('vue-loader')
.tap(options => {
options.compilerOptions.modules = [VuetifyProgressiveModule];
return options;
});
config.module
.rule('images')
.oneOf('progressiveImages')
.test(/\.(png|jpe?g|gif)$/)
.resourceQuery(/vuetify-preload/)
.use('vuetify-loader/progressive-loader')
.loader('url-loader')
.options({ limit: 8000 })
.end()
.end()
.oneOf('progressiveImagesOther')
.use('url-loader')
.loader('url-loader')
.options({ limit: 8000 })
.end()
.end();
},
};
I’ve installed both ImageMagick and GraphicsMagick, both of them return same issue. Loader seems to be returning a base64 string, but it must be parsed incorrectly, since, strings that are returned can’t be parsed to the image.
Is there something I’m missing? Could it be caused by Vue Cli 3 maybe?
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
vue.js - Vuetify- image Load failed - Stack Overflow
As you can see here and here, the message is generated as a result of onerror event raised by browser itself so this...
Read more >Vuetify Image load failed - Get Help - Vue Forum
I have a problem Loading some Image in Vuejs using v-img inside v-carousel-item. I get this error. Is there any error in my...
Read more >[Solved]-Vuetify Image load failed-Vue.js - appsloveworld.com
Coding example for the question Vuetify Image load failed-Vue.js. ... To see what they get compiled into, simply console.log(this.images) in mounted() .
Read more >Image component — Vuetify
Usage. v-img component is used to display a responsive image with lazy-load and placeholder.
Read more >vue dynamic image src
Failed to load latest commit information. Type. Name. Progressive images. vuetify-loader can automatically generate low-res placeholders for the v-img ...
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 FreeTop 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
Top GitHub Comments
try to use <v-img :src="require(‘@/assets/img/home/mac-left.jpg’) ></v-img>
@as4101741 great 😉 that does it