Usage with images from public folder
See original GitHub issueIs it possible to use this plugin for images from /public
folder?
Is this connected to RafidMuhymin/astro-image-demo/issues/1 ?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
ReactJS and images in public folder - Stack Overflow
A simple solution is to use paths like this /images/logoFooter.png . If the file is ...
Read more >Using the Public Folder - Create React App
To reference assets in the public folder, you need to use an environment ... as described in “Adding Images and Fonts” above this...
Read more >How to use files in public folder in ReactJS ? - GeeksforGeeks
How to use files in public folder in ReactJS ? · Step 1: Create a React application using the following command: npx create-react-app...
Read more >How to import or use images in ReactJS - Tutorialswebsite
To reference asset in the public folder, you need to use a special variable called “PUBLIC_URL”. You can only access the image with ......
Read more >how to add image in react from public folder - You.com
To add images in public folder with React, we get the path to the public folder with process.env.PUBLIC_URL and concatenate the relative image...
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
Yes, I agree 100%. btw Astro said they’re going to implement something similar to this (out-of-the-box) in the future…
It looks like it’s necessary to add the
/public
path explicitly to thesrc
. I think this is unfortunate, maybe this package could try looking inside/public
automatically if it can’t find the file at the provided src? I’m trying to convert an<img>
to<Picture/>
, and it’s unfortunate that the normalsrc
can’t be used.