Closed charlesmulder closed 4 years ago
Ah ha. gatsby-wpgraphql-inline-images
has it's own undocumented pathPrefix
configuration option.
{
resolve: 'gatsby-wpgraphql-inline-images',
options: {
pathPrefix: process.env.NODE_ENV === 'production' ? '/my-prefix' : '',
},
},
It's not documented because I haven't tested it. Never needed that. It would be very helpful if you could test and comment whether it works as expected.
Yes, it seems to work as expected. If I find anything strange, I will report it here.
Thanks for the plugin!
Inline images are displaying correctly in development environment, but inline images are missing when building and deploying to a sub-folder.
Gatsby allows this by setting the
pathPrefix
configuration option ingatsby-config.js
.My guess is the plugin isn't using the
withPrefix
function, which is explained in the following article Adding a Path Prefix.I'm still investigating, where the
/static
path is being set...might not be in this plugin. Any advice is appreciated.