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

Image Paths Not Replaced + Images Broken #3

Open
karlhorky opened this issue Jun 11, 2021 · 2 comments
Open

Image Paths Not Replaced + Images Broken #3

karlhorky opened this issue Jun 11, 2021 · 2 comments

Comments

@karlhorky
Copy link

karlhorky commented Jun 11, 2021

I've tried using gatsby-plugin-relative-paths with a project, and it seems to mostly work, really cool, thanks!

However, it seems that media paths such as image and video paths are not getting replaced.... 🤔 Maybe because Gatsby doesn't consider them to change when assetPath is used? I tried changing both assetPath and pathPrefix (and also ONLY pathPrefix), as well as trying gatsby-plugin-ipfs, but nothing seems to help here... :(

I'm using the following:


Edit: it seems as if the images themselves are actually broken when using this plugin too 🤔 See below...

@karlhorky
Copy link
Author

karlhorky commented Jun 17, 2021

Seems like part of this is a bug in mdx-deck: jxnblk/mdx-deck#799

But another part of it seems to be broken images and media as a result of gatsby-plugin-relative-paths, which show up as this in eg. VS Code:

Here are a few example files that are broken:


No idea why these are broken - tried looking at the binary image data, but couldn't see any perceptible differences...

Here's the originals:

@karlhorky
Copy link
Author

karlhorky commented Jun 17, 2021

I've figured out a much simpler solution, that allows for avoiding usage of the gatsby-plugin-ipfs and gatsby-plugin-relative-paths plugins altogether (by using a programmatic value for the pathPrefix option in the Gatsby config):

jxnblk/mdx-deck#535 (comment)

@karlhorky karlhorky changed the title Image Paths Not Replaced Image Paths Not Replaced + Images Broken Jun 17, 2021
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

No branches or pull requests

1 participant