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

Asset Prefix does not works on SVG #25918

Closed
kaknut opened this issue Jul 21, 2020 · 4 comments · Fixed by #26976
Closed

Asset Prefix does not works on SVG #25918

kaknut opened this issue Jul 21, 2020 · 4 comments · Fixed by #26976
Assignees
Labels
status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. topic: remark/mdx Related to Markdown, remark & MDX ecosystem type: bug An issue or pull request relating to a bug in Gatsby

Comments

@kaknut
Copy link
Contributor

kaknut commented Jul 21, 2020

https://www.gatsbyjs.org/docs/asset-prefix/

Description

The build command for asset prefix does not work with .svg files.
If you use img/demo.svg in markdown then it get's converted to https://www.your-domain.com/https:/cdn.your-domain.com/{generated-hash-values}/demo.svg

Steps to reproduce

Just add path prefix build on a page which load .svg type images.

Expected result

If you use img/demo.svg in markdown then it should get converted to https:/cdn.your-domain.com/{generated-hash-values}/demo.svg

Actual result

If you use img/demo.svg in markdown then it get's converted to https://www.your-domain.com/https:/cdn.your-domain.com/{generated-hash-values}/demo.svg. This leads to image returning 4xx

Environment

gatsby build --prefix-paths

@kaknut kaknut added the type: bug An issue or pull request relating to a bug in Gatsby label Jul 21, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 21, 2020
@madalynrose madalynrose added status: needs docs review Pull request related to documentation waiting for review type: documentation An issue or pull request for improving or updating Gatsby's documentation and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jul 21, 2020
@kaknut
Copy link
Contributor Author

kaknut commented Jul 22, 2020

Is this a known issue?

@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Aug 11, 2020
@kaknut kaknut added not stale and removed stale? Issue that may be closed soon due to the original author not responding any more. labels Aug 11, 2020
@meganesu meganesu removed status: needs docs review Pull request related to documentation waiting for review type: documentation An issue or pull request for improving or updating Gatsby's documentation labels Sep 18, 2020
@wardpeet wardpeet added the topic: remark/mdx Related to Markdown, remark & MDX ecosystem label Sep 21, 2020
@wardpeet
Copy link
Contributor

That seems to be a bug indeed with our remark parser. Thank you for raising it

@pieh
Copy link
Contributor

pieh commented Sep 21, 2020

Pending fix for this problem: #26976

@pieh pieh added the status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. label Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. topic: remark/mdx Related to Markdown, remark & MDX ecosystem type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants