Skip to content
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

Images not showing up correctly on Github #13

Open
Bobicheng-Zhang opened this issue Oct 5, 2018 · 13 comments
Open

Images not showing up correctly on Github #13

Bobicheng-Zhang opened this issue Oct 5, 2018 · 13 comments

Comments

@Bobicheng-Zhang
Copy link

Bobicheng-Zhang commented Oct 5, 2018

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?

@ghost
Copy link

ghost commented Oct 5, 2018

I'm having the same problem!

@bensoltoff
Copy link
Contributor

In order to troubleshoot, you need to either push your commit to your hw01 fork or copy and paste the code here.

@mayank-kgp
Copy link

@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.

@Bobicheng-Zhang
Copy link
Author

Bobicheng-Zhang commented Oct 5, 2018

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.

@mayank-kgp
Copy link

mayank-kgp commented Oct 5, 2018

@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.

@bensoltoff
Copy link
Contributor

Instead stage and commit the image inside of your hw01 repo. Then the file path is just the name of the image

@Bobicheng-Zhang
Copy link
Author

@mayank-kgp I also copied the file path Github gave me but it didn't work either.

@mayank-kgp
Copy link

@Bobicheng-Zhang Make the url - IMG_0929.jpg or /IMG_0929.jpg.
Let me know if either of these url works.

@Bobicheng-Zhang
Copy link
Author

It worked! Thank you! @bensoltoff @mayank-kgp

@mayank-kgp
Copy link

@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.

@abbygirlrose
Copy link

Any idea why my image would show up in my own git (https://github.com/abbygirlrose/hw01) but not inside the pull request (cfss-fa20/hw01@aff1b98?short_path=04c6e90#diff-04c6e90faac2675aa89e2176d2eec7d8)?

@mayank-kgp
Copy link

@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.

@abbygirlrose
Copy link

hm thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants