-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change image url for subfolder projects? #69
Comments
Hey, Will need to take a look at this. |
@codestitch have you soled it?
|
Hi. since my project is deployed in sub folder here are the following changes that i did for the images to work properly.
and change
from |
@codestitch Thanks i just added |
Hi.
In my HeaderComponent (located in src/components/navigation/) this is what it looks like when i include an image from images folder
let yeomanImage = require('../../images/logo.png');
then use it<img className='img-header' src={yeomanImage}/>
. It runs fine in dev server.Now when I compiled my project to production. I changed my index.html in /dist folder from
<script type="text/javascript" src="/assets/app.js"></script>
to this<script type="text/javascript" src="./assets/app.js"></script>
.When I run the compiled project it can't seem to find the image.
How do I change my require in getting the image?
Thanks for your help.
Cheers!
The text was updated successfully, but these errors were encountered: