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

Inserting an image from a domain that's not github #50

Closed
SeanPlusPlus opened this issue Apr 2, 2014 · 2 comments
Closed

Inserting an image from a domain that's not github #50

SeanPlusPlus opened this issue Apr 2, 2014 · 2 comments
Labels
Milestone

Comments

@SeanPlusPlus
Copy link

How do I modify the config to allow inserting images which are not hosted on github?

For example:

Does not work:

Foo Image

Works fine:

Foo Image

@joeyespo joeyespo added the bug label Jun 14, 2014
@joeyespo joeyespo added this to the 2.1 milestone Jun 14, 2014
@joeyespo
Copy link
Owner

Just tested this locally. Seems to be working now. Probably had something to do with the binary file fix.

Try pulling the latest (or upgrading to grip 2.1 once it's released), and let me know if you're still having problems with this.

joeyespo added a commit that referenced this issue Jul 27, 2014
The problem appears to be that GitHub replaces all external images with a cache
stored on their servers. When using the Markdown API, these image URLs are still
replaced, but image doesn't always resolve. The effect is that sometimes images
are shown, and sometimes not. This is probably why #50 appeared to be resolved.

This fix makes sure the image is shown from the source, so it'll always
resolve (as long as it still exists on the original servers). A slightly better
fix would be to only handle images that error out, but that optimization will
be in a future fix.
@joeyespo
Copy link
Owner

Recently noticed this happening to me too. It seems the Markdown API still returns a cache URL, but the URL doesn't always resolve to an image. (Perhaps the API doesn't trigger the cache to re-fetch the image when it's out of date?)

This is officially fixed in 77267ce by using the canonical image URL for all images.

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

No branches or pull requests

2 participants