Skip to content

Image attachments not being shown in production #683

Answered by tea-artist
junaid33 asked this question in Q&A
Discussion options

You must be logged in to vote

I may have figured out the reason, next image security policy is blocking access to external domains, you need to add a configuration:

https://github.com/teableio/template-site/blob/main/next.config.mjs

/** @type {import('next').NextConfig} */
const nextConfig = {
  images: {
    remotePatterns: [
      {
        protocol: 'https',
        hostname: '*.your-prefix.railway.app',
      },
    ],
  },
};

export default nextConfig;

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tea-artist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants