twopluszero / next-images

Import images in Next.js (supports jpg, jpeg, svg, png and gif images)
MIT License
949 stars 67 forks source link

Doesn't work with Google profile images storage #96

Closed zanzlender closed 11 months ago

zanzlender commented 11 months ago

Hello, I've been experiencing an issue with this which I could not figure out why... When trying to add Google's profile image storage as a remote pattern it always says it's not configured when using it.

My next-config:

{
  images: {
    remotePatterns: [
      {
         protocol: "https",
         hostname: "*.googleusercontent.com",
         port: "",
         pathname: "*",
      }
    ]
  }
}

I also tried with lh3.googleusercontent.com which is the full address but it still doesn't work. Also, I am worried that if Google for some reason changes this hostname in the future my app will crash.

Am I doing something wrong or do I have no other option but to use the regular tag?

zanzlender commented 11 months ago

Moved to NextJS discussion panel #58961