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

[README]: Allow media.githubusercontent.com Images in README.md #8878

Open
RehanSaeed opened this issue Nov 12, 2021 · 8 comments
Open

[README]: Allow media.githubusercontent.com Images in README.md #8878

RehanSaeed opened this issue Nov 12, 2021 · 8 comments
Assignees
Labels
feature-request Customer feature request

Comments

@RehanSaeed
Copy link

Related Problem

I have the following image in my README.md:

Banner

This uses the URL:

https://media.githubusercontent.com/media/RehanSaeed/Serilog.Enrichers.Span/main/Images/Banner.png

This shows like this on NuGet:

image

The Elevator Pitch

Please allow images from media.githubusercontent.com in README.md.

Additional Context and Details

No response

@RehanSaeed RehanSaeed added the feature-request Customer feature request label Nov 12, 2021
@augustoproiete
Copy link
Contributor

Workaround in the meantime: https://cdn.jsdelivr.net/gh/RehanSaeed/[email protected]/Images/Banner.png

banner

@lyndaidaii
Copy link
Contributor

@augustoproiete, we support list of github related domain below(https://docs.microsoft.com/en-us/nuget/nuget-org/package-readme-on-nuget-org#allowed-domains-for-images-and-badges):
camo.githubusercontent.com
github.com/.../workflows/.../badge.svg
raw.github.com
raw.githubusercontent.com
user-images.githubusercontent.com

The workaround is you could use domain above to render your images.
For the domain, media.githubusercontent.com, we have some security and privacy requirement if we want to add new domain to our allowlist, we will take time to evaluate this domain. We will keep up update once we have a result. Thanks for your patience.

@lyndaidaii lyndaidaii self-assigned this Nov 16, 2021
@augustoproiete
Copy link
Contributor

@lyndaidaii Will leave it for @RehanSaeed to decide if he would like to pursue further. I merely suggested a workaround. ☺️

@Xyncgas
Copy link

Xyncgas commented Nov 17, 2021

I mean why not just auto accept all request as long these domains are already related to the ones we have.
for example we can confirm when you go to this domain it's part of github

@RehanSaeed
Copy link
Author

I tried switching the image to use a direct github URL and that still didn't work.

https://github.com/RehanSaeed/Serilog.Enrichers.Span/blob/main/Images/Banner.png

Please add support for both.

@loic-sharma loic-sharma changed the title [Feature]: Allow media.githubusercontent.com Images in README.md [README]: Allow media.githubusercontent.com Images in README.md Nov 28, 2021
@Giorgi
Copy link

Giorgi commented Jul 6, 2022

In my project the image URL is https://raw.githubusercontent.com/Giorgi/DuckDB.NET/main/Logo.jpg but it is still not displayed on NuGet even though Allowed domains for images and badges contains raw.githubusercontent.com

image

@lyndaidaii
Copy link
Contributor

@Giorgi I was able to display the image URL you provided on NuGet.org. Please let me know if you have further question.
Screenshot 2022-07-06 104210

@Giorgi
Copy link

Giorgi commented Jul 6, 2022

@lyndaidaii

It could be a different issue but I'm not sure. For the logo, Readme.md contains this: ![Project Icon](Logo.jpg "DuckDB.NET Project Icon") This is a relative URL for the image in repo and GitHub understands it and renders it as a picture with domain raw.githubusercontent.com but when I use the same Readme on NuGet I guess NuGet doesn't know how to resolve this relative URL?

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

No branches or pull requests

5 participants