Search code examples
reactjsgatsbygatsby-image

Where do you store gatsby-images?


new to Gatsby here.

I've followed the Gatsby-image guide and store my photos in an images folder in my project and pull the photos via graphQL from there. It works great locally but I guess that kind of storage is not meant for actually production? As I get the 'failed to load resource error' from the public HTML and blurry images when deployed. From browsing through stack overflow and github it looks like a ton of people run in to this.

So where does everyone store their photos? Just curious for some advice, thanks!


Solution

  • You have plenty of choices:

    Cloud-Based solutions

    Others:

    • Node framework's public folder. (Most of the time it's statically served)
    • Directly serve them from an Nginx or an Apache.

    The list isn't exhaustive.

    I recommend you to use Cloud storage because it's cheaper and you have 99.99% availability. It is also easier to link them with cloud services like permission ones (IAM of AWS for example).

    And for your use case AppSync for GraphQl.