I want to display images from my AWS S3 bucket in GitHub issues, but the aliased source URL provided by GitHub isn't working.
My markdown:
![test](https://s3-us-west-2.amazonaws.com/gitshoes/screenshot20140422-45272-isuk4x.png)
The HTML generated by GitHub:
<img src="https://camo.githubusercontent.com/b02d0cf44d4ba89549749d299ca9fcfb50612ee7/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f67697473686f65732f73637265656e73686f7432303134303432322d34353237322d6973756b34782e706e67"
alt="test"
data-canonical-src="https://s3-us-west-2.amazonaws.com/gitshoes/screenshot20140422-45272-isuk4x.png"
style="max-width:100%;">
The image url I provided (data-canonical-src) works, but the camo.githubusercontent.com
just says "Not Found".
I tried using different image URLs, so the problem seems to be specific to AWS images. I have already made my bucket's AWS images public, so that is probably not the problem either.
Easiest thing to do is make them public in s3, at least read-only. If you don't want them to be public on s3, for whatever reason, you could add a cloudfront distribution that will serve the images from your s3 bucket, and you can give cloudfront access to the files, without making the images public in s3.
Select the Source provider: Github. Click the Connect to Github button. Authenticate Authorize AWS CodePipeline to access your Github Repos. After authentication, select the Repository with your static website files.
Amazon S3 offers scalable storage that lets businesses store and manage endless amounts of items in the cloud. It not only offers huge storage allowance but it does so with extremely fast speeds, allowing users to quickly retrieve and share their stored images.
I think it might be because the content type response headers are not set to Content-Type: image/png
If you open up chrome inspector go to the network tab and then load your image url you will see it says in the response headers
Content-Type:
https://i.imgur.com/krwv2oe.jpg if you look at that you'll see it has response headers content-type:image/jpeg
You'll probably need to configure your aws bucket to return content-type headers that reflect the content its returning.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With