Open Bobicheng-Zhang opened 6 years ago
I'm having the same problem!
In order to troubleshoot, you need to either push your commit to your hw01
fork or copy and paste the code here.
@Bobicheng-Zhang @avajurden Most likely it is because of the image URL. If the image exists in your laptop and not in Github then you need to push the image to GitHub. Also, reply with the markdown which you have written in Readme file.
I have pushed the commit to branch homework1 in my hw01 fork.
![](/Users/zbbc/Github/Hw1/IMG_0929.jpg)
This is what I used. Since I pushed the image to Github, I also tried using the file path on Github, but that didn't work either.
@Bobicheng-Zhang Your image url is /Users/zbbc/Github/Computing_SS/Hw1/IMG_0929.jpg This path exists on your laptop but not on the server(i.e. GitHub). That's why the image is not being shown.
Instead stage and commit the image inside of your hw01
repo. Then the file path is just the name of the image
@mayank-kgp I also copied the file path Github gave me but it didn't work either.
@Bobicheng-Zhang Make the url - IMG_0929.jpg or /IMG_0929.jpg. Let me know if either of these url works.
It worked! Thank you! @bensoltoff @mayank-kgp
@Bobicheng-Zhang You don't need to do branching as there are separate repositories for each homework which you need to fork every week. However, it doesn't matter.
Any idea why my image would show up in my own git (https://github.com/abbygirlrose/hw01) but not inside the pull request (https://github.com/uc-cfss/hw01/pull/14/commits/aff1b98a0afe09a8f382b1cf7cc7fa81fe9b4134?short_path=04c6e90#diff-04c6e90faac2675aa89e2176d2eec7d8)?
@abbygirlrose Because the image file exist on your own git. But it is not on the uc-cfss Github repo yet. You have sent the image as a part of the pull request. So once your pull request is merged then it will be shown. Meanwhile, you can try editing the image url as https://github.com/abbygirlrose/hw01/blob/master/ab.png (url of image in your own git) and see if it works.
hm thanks!
I am having trouble displaying an image on Github even though it shows up on RStudio preview perfectly. The error message I received after clicking on the picture is 404. Is anyone else having this problem?