Static images not loading from assets library
See original GitHub issueI am trying to load the images from shared assets library in to stories i created with libraries in Nx workspace. I have made necessary changes for that. but images loading in images.
my Main.js
staticDirs: [{ from: "../../../libs/shared/assets/src/lib/images/", to:'./assets/images/' }],
on complier I am getting the following information:
info => Serving static files from ./.\libs\shared\assets\src\lib\images\ at /.\assets\images
But stories on browser: Loaded with no image. Please help.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Images not loading from assets folder in Angular
Topic: Images not loading from assets folder in Angular ... in app.component.html. assets and images folder location: projectfolder\src\assets\images ...
Read more >Angular 6 Failing To Load Images From Assets [duplicate]
Any idea why this is not working? My image.png is in my assets folder which is located at src/assets/image.png. Update: So we did...
Read more >Images, fonts, and assets - Storybook - JS.ORG
We recommend serving static files via Storybook to ensure that your components always have the assets they need to load. We recommend this...
Read more >7 Reasons Why Images Are Not Loading on Your Website
7 Reasons Why Images Are Not Loading on Your Website · 1. Incorrect File Paths · 2. Files Names Misspelled · 3. Wrong...
Read more >HTML and Static Assets
You have thousands of images and need to dynamically reference their paths. Some library may be incompatible with Webpack and you have no...
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
I have the setup you described, linking my assets like this in my Next.js app’s project.json:
Where I have the assets at
libs/ui/icons/assets
and trying to load my assets using<img src="/assets/icons/icon.png">
. This setup worked fine in previous versions but crashed with 15.5.4. In #11431 I saw this comment. Updating copy-webpack-plugin might have changed the previous behavior.This issue has been automatically marked as stale because it hasn’t had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏