Nuxt-img src path not found

Viewed 17

I can't use the component nuxt-image, 404 not found. It may be something to do with the config but failed to look at the doc and tutos. Anyone ?

enter image description here

My nuxt.config.js:

export default {
  ssr: false,
  css: ['~/assets/styles/main.scss'],
  plugins: [
    {
      src: '~/plugins/locomotive.js',
      ssr: false,
    },
  ],
  loading: '~/components/Loading.vue',
  modules: ['@nuxt/http', '@nuxtjs/robots', '@nuxt/image'],

  image: {
    presets: {
      imgMin: {
        modifiers: {
          format: 'webp',
          fit: 'cover',
          quality: '60',
        },
      },
    },
  },

  robots: {
    UserAgent: '*',
    Disallow: '/admin',
    Allow: '/',
  },
  buildModules: ['@nuxtjs/style-resources', '@nuxtjs/google-analytics'],
  pageTransition: 'fade',
}

My package.json:

enter image description here

My template.vue:

<nuxt-img src="~/assets/medias/img/home/1.png" alt="image" preset="imgMin" />
0 Answers
Related