Click here to Skip to main content
16,022,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
in my vue 3 project, i have:

<img src="../../assets/images/logo_desktop.jpg"

and upon building it ends up being:

<img src="data:image/jpeg;base64,iVBORw0KGgoAAAAN...


i'm guessing this is something in webpack, or one of the 10,000 node modules i have installed? anyone know how i can turn this behavior OFF?

What I have tried:

i'm having a tough time finding the solution via web search
Posted
Updated 13-May-24 18:55pm

finally fixed the issue, using the latest VUE cli (May 2024),

// vue.config.js
module.exports = {
  chainWebpack: config => {
    config.module
      .rule('images')
        .set('parser', {
          dataUrlCondition: {
            maxSize: -1
          }
        })
  }
}
 
Share this answer
 
Sounds like you have the url-loader[^] module installed. Or, if you're on v5, you may have migrated to asset modules[^].

It looks like both have configuration options you can tweak.
 
Share this answer
 
Comments
carlos 024 14-May-24 8:47am    
I ran 'npm remove url-loader' and 'npm remove asset', re-built, issue persists.
here is my 'npm list':

├── @fortawesome/fontawesome-svg-core@6.4.2
├── @fortawesome/free-solid-svg-icons@6.4.2
├── @fortawesome/vue-fontawesome@3.0.3
├── @vue/cli-init@5.0.8
├── @vue/cli-plugin-babel@5.0.8
├── @vue/cli-service@5.0.8
├── @vue/compiler-sfc@3.3.8
├── axios@1.6.0
├── babel-eslint@10.1.0
├── copy-webpack-plugin@11.0.0
├── core-js@3.33.2
├── eslint-plugin-vue@9.18.1
├── eslint@8.53.0
├── firebase-auth@0.1.2
├── firebase@10.5.2
├── image-js@0.35.5
├── jquery@3.7.1
├── mitt@3.0.1
├── module@1.2.5
├── npm@10.2.3
├── popper.js@1.16.1
├── register-service-worker@1.7.2
├── rimraf@5.0.5
├── vee-validate@4.11.8
├── vue-cropperjs@5.0.0
├── vue-router@4.2.5
├── vue-sweetalert2@5.0.5
├── vue@3.3.8
├── vuex@4.1.0
└── yup@1.3.2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900