Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] CImage not show relative image from local assets folder

See original GitHub issue

Describe the bug CImage component is not show image when call from assets folder

To Reproduce Steps to reproduce the behavior: import image from assets path(src/assets/…) image will not show


Result screenshot

folder structor folder structure

Desktop (please complete the following information):

  • OS: Mac Os
  • Browser: Microsoft Edge(79.0.309.71), Google Chrome(83.0.4103.97)

Additional context Code for test this issue gist

ps. sorry if im do report wrong 😅

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

codebender828commented, Jun 9, 2020

Oh. Good catch. Sorry about this inconvenience. I think i have an idea about what’s going on.

I can suggest two workarounds for now.

Workaround 1. Try including the asset path inside a require() statement. That might be the issue.

Workaround 2. (For latest version 0.5.11) Try using normal img with the v-chakra directive

See docs:

Let me know if these work arounds work for you in the meantime. 🙏

At the moment I’m writing my thesis so I need to focus a bit on school. I won’t be able to work on it until maybe after next week. 🙏

But this issue open for contributions!

codebender828commented, Jul 17, 2020

Closed by #258

Read more comments on GitHub >

github_iconTop Results From Across the Web

Images not loading from assets folder in Angular
You're using the wrong path to the images. In the Angular project, you don't have to add the relative path from your file...
Read more >
Cannot get relative image path in angular 6 - Stack Overflow
Show activity on this post. At first you should move your assets like the img you use into the assets folder which is...
Read more >
Assets/Images not being served... · Issue #9852 - GitHub
I have made sure that my angular-cli.json lists the assets folder... image. Assets folder directly under src directory image. HTML is typical. < ......
Read more >
Adding assets and images - Flutter documentation
How to use images (and other assets) in your Flutter app. ... Each asset is identified by an explicit path (relative to the...
Read more >
Images, fonts, and assets - Storybook - JS.ORG
In this case, you need to have all your images and media files with relative paths. Otherwise, the browser cannot locate those files....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found