Design comparison
Solution retrospective
This is my 4th project but still i'm struggling to add images to different type of projects.In my browser it shows well but in some deployment apps it isn't showing the image.What should i do?Anyone please suggest me.
Community feedback
- @shivaprakash-sudoPosted over 2 years ago
Hello Sindhuja,
The issue would most probably be related to the path of the image you're providing in the HTML. We have to provide relative paths to the image
src
attribute, for example, let's consider a project structure as follows.QR code component images qr-image.png index.html styles.css
In this case, the image
src
inside your HTML should have something like./images/qr-image.png
, where one.
represents that we're searching something inside the root folder, which in our case is theimages
folder and inside that we're taking the image.I used to have this problem too, but after some researching the above solution was what I found to be helpful. I hope it solves your problem, please let me know if it doesn't.
Also, the GitHub repository link doesn't seem to work, can you please provide a link to your source code?
Marked as helpful0@SindhujaBandaruPosted over 2 years ago@shivaprakash-sudo Thankyou shivaprakash-sudo, Now i fixed the problem.The link to github repository is https://github.com/SindhujaBandaru/Qr-code-component.git
1 - @r2yoPosted over 2 years ago
your repository doesn't have an images folder on it so your code can't find the photo you can use the method "add file -> upload file" on GitHub and then drag the images folder into it "not checkmark it"
but my suggestion is you learn to work with git commands and use this link as a reference
https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository
Marked as helpful0@SindhujaBandaruPosted over 2 years ago@r2yo Thankyou @r2yo With your help i uploaded images folder.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord