TylerBarnes / gatsby-wordpress-inline-images

Fluid images for gatsby-source-wordpress inline images in post_content
57 stars 25 forks source link

Don't work using searchAndReplaceContentUrls #13

Closed daniloef closed 5 years ago

daniloef commented 5 years ago

Hi,

If I use searchAndReplaceContentUrls in gatsby-config.js in order to replace the links in the articles the plugin doesn't work!

              searchAndReplaceContentUrls: {
                sourceUrl: "wp.my-site.com",
                replacementUrl: "my-site.com"
              },

If I comment this configuration the plugin works perfectly, but when activate it the images post have something like "http://my-site.com/wp-content/uploads/2019/05/photo-name.jpg" in the SRC.

Regards.

TylerBarnes commented 5 years ago

Hey @daniloef the full url is required for this plugin but your search and replace removes the url from the post content. Check this comment for a potential solution -> https://github.com/TylerBarnes/gatsby-wordpress-inline-images/issues/8#issuecomment-490339802

I don't see this as a bug as it's intended behaviour for both pieces of functionality, so I'm gonna close it. Feel free to send me any more questions or comments here though.