DEV Community

Discussion on: Why did I build my portfolio website with GatsbyJS?

 
bitdweller profile image
Pedro Pimenta

Oh, yes, it is built again and the images are served from Gatsby to the user. AWS only stores the images for the CMS and because of how Gatsby works, it downloads and compresses images and serves them from wherever you host Gatsby. I really didn't think that through :)

So in the end, AWS is only for the CMS to store content. This is needed if you upload to a server like Heroku because Heroku doesn't allow you to write files to the filesystem. If you host it on a "regular" server you won't need the S3 bucket, you can save the images on the server. Then Gatsby would do the same, fetch the images and host them itself.

So, as you asked, Gatsby is re-built everytime I hit Save on Strapi through a Webhook. The point of having Gatsby is to build a static site, it doesn't make sense to fetch content in real-time. You would use a regular React webapp in that case.

Hope it helps! Ask me anything else, I am not an expert and this conversation helps very much :)