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

fix: image for Deploy To Spaces svg #1481

Closed
wants to merge 1 commit into from

Conversation

mscolnick
Copy link
Contributor

@mscolnick mscolnick commented Nov 4, 2024

Updates the URLs to use raw instead of resolve which gets the svgs to show up properly.

@mscolnick mscolnick changed the title ms/fix svgs img fix: image for Deploy To Spaces svg Nov 4, 2024
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@julien-c
Copy link
Member

julien-c commented Nov 4, 2024

hmm this is weird, what is the issue with resolve? i think resolve is the intended way to do this but cc @coyotte508 for guidance

Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah i see arf – we'll fix this upstream

image

@cfahlgren1 cfahlgren1 self-requested a review November 4, 2024 18:29
Copy link
Member

@coyotte508 coyotte508 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there's a problem for most users.

If you go on https://huggingface.co/docs/hub/spaces-sdks-docker-giskard in a private browsing session it'll show fine.

The problem happens because you accessed the SVG directly, which "poisons" your cache with a wrong content-type - as we render different content-type depending on if served as an image or not (with the sec-fetch-dest header).

We could fix the problem at the root if we find how to avoid this cache issue - but anyway no problem for 99.9% of the users - unless they accessed https://huggingface.co/datasets/huggingface/badges/resolve/main/deploy-to-spaces-lg.svg directly first

@mscolnick
Copy link
Contributor Author

Ah thanks for the explanation, I did indeed go to that url

@mscolnick mscolnick closed this Nov 12, 2024
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

Successfully merging this pull request may close these issues.

5 participants