Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48979

Correct path for custom icon local image assets in Ionic 5

$
0
0

I know this has been asked before of previous versions of the platform, but I can’t get anything to work.

Goal: store app icon assets so they don’t take time to load

Problem: no local asset path works–in every case, the app tries to load the /index.html into the svg image tag. I.e. the src path is not preprocessed as an asset path.

For /img/ directory under /src/, I have tried the following, all of which try to load the index.html SPA, i.e. Ionic is not processing these paths as local asset paths at all.

 addIcons({
      'home1': '/assets/img/icon.svg',
      'home2': './assets/img/icon.svg',
      'home'3: 'assets/img/icon.svg',
      'home'4: '@/assets/img/icon.svg',
      'home'5: '../assets/img/icon.svg',
      'home'6: '../../assets/img/icon.svg',
    })

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48979

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>