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

Adding assetPrefix to Blog starter adds slash to beginning of gif urls after gatsby build #23556

Closed
hallee9000 opened this issue Apr 28, 2020 · 4 comments
Labels
stale? Issue that may be closed soon due to the original author not responding any more. status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. topic: media Related to gatsby-plugin-image, or general image/media processing topics type: bug An issue or pull request relating to a bug in Gatsby

Comments

@hallee9000
Copy link

hallee9000 commented Apr 28, 2020

Description

I created a blog stater project and add assetPrefix to gatsby-config.js, but it generates a wired url for gif in markdown file when building.

Steps to reproduce

  1. Clone this repository, the diff from gatsby-stater-blog is here.
  2. Install dependencies
  3. Run yarn build
  4. Look into public/hello-world/index.html and find Kabutack.gif
  5. This img's url is wired (It's /https:/cdn.jsdelivr.net/gh/leadream/juuun.io@gh-pages/63c893e9f09f78fd314f5205a266006f/Kabutack.gif)

Expected result

This img's url should be https://cdn.jsdelivr.net/gh/leadream/juuun.io@gh-pages/63c893e9f09f78fd314f5205a266006f/Kabutack.gif, without the first slash.

Actual result

This img's url is /https:/cdn.jsdelivr.net/gh/leadream/juuun.io@gh-pages/63c893e9f09f78fd314f5205a266006f/Kabutack.gif and can't access.

Environment

  System:
    OS: macOS 10.15.4
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 13.2.0 - /usr/local/bin/node
    Yarn: 1.19.1 - /usr/local/bin/yarn
    npm: 5.6.0 - /usr/local/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 81.0.4044.122
    Firefox: 70.0.1
    Safari: 13.1
  npmPackages:
    gatsby: ^2.21.0 => 2.21.0
    gatsby-image: ^2.4.0 => 2.4.0
    gatsby-plugin-feed: ^2.5.0 => 2.5.0
    gatsby-plugin-google-analytics: ^2.3.0 => 2.3.0
    gatsby-plugin-manifest: ^2.4.0 => 2.4.0
    gatsby-plugin-offline: ^3.2.0 => 3.2.0
    gatsby-plugin-react-helmet: ^3.3.0 => 3.3.0
    gatsby-plugin-sharp: ^2.6.0 => 2.6.0
    gatsby-plugin-typography: ^2.5.0 => 2.5.0
    gatsby-remark-copy-linked-files: ^2.3.0 => 2.3.0
    gatsby-remark-images: ^3.3.0 => 3.3.0
    gatsby-remark-prismjs: ^3.5.0 => 3.5.0
    gatsby-remark-responsive-iframe: ^2.4.0 => 2.4.0
    gatsby-remark-smartypants: ^2.3.0 => 2.3.0
    gatsby-source-filesystem: ^2.3.0 => 2.3.0
    gatsby-transformer-remark: ^2.8.0 => 2.8.0
    gatsby-transformer-sharp: ^2.5.0 => 2.5.0
@hallee9000 hallee9000 added the type: bug An issue or pull request relating to a bug in Gatsby label Apr 28, 2020
@hallee9000 hallee9000 changed the title Adding assetPrefix to Blog starter makes gifs' url wired. Adding assetPrefix to Blog starter makes gifs' url wired when building. Apr 28, 2020
@madalynrose madalynrose added the status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. label Apr 28, 2020
@madalynrose madalynrose changed the title Adding assetPrefix to Blog starter makes gifs' url wired when building. Adding assetPrefix to Blog starter adds slash to beginning of gif urls after gatsby build Apr 28, 2020
@ghost
Copy link

ghost commented May 5, 2020

Is there any work around for this in the time being?

@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 May 25, 2020
@danabrit danabrit added the topic: media Related to gatsby-plugin-image, or general image/media processing topics label May 29, 2020
@github-actions
Copy link

github-actions bot commented Jun 5, 2020

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.
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 again for being part of the Gatsby community! 💪💜

@github-actions github-actions bot closed this as completed Jun 5, 2020
@jcomo
Copy link

jcomo commented Sep 1, 2021

For anyone else who stumbles on this abandoned issue, the fix is to update gatsby-remark-copy-linked-files 2.3.16. See the patch here: #26976

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more. status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. topic: media Related to gatsby-plugin-image, or general image/media processing topics type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

4 participants