Skip to content
Discussion options

You must be logged in to vote

After investigating it for quite some time, I found what was causing the bug. It's not related to Webpack or any configuration.

I was adding some attributes to the head element, especially the cover URL of my blog post through a shared variable called imagePath:

export default function Blog({ post, slug }) {
  const imagePath = `images/${slug}/cover.jpg`;

  return (
    <Layout>
      {/* The SEO component adds a bunch of meta properties to the `Head` component from Next */}
      <SEO
        title={title}
        description={description}
        cover={`${config.url}/${imagePath}`}
      /> 
      
      {/* ... */}
      
      <Image
        priority
        src={require(`../public/${

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by thomaslombart
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants