Hi, for a React app is the recommended way to serve .jpeg and .png images for a homepage to leave it in the project file and bundle everything in the container, or should I host the images externally using a service such as S3?
What are the tradeoffs for each approach and is there a point where you’d switch from one method to the other? Thanks for your help!
Just tried deploying using url_prefix = "/static" and images are loading as expected.
Since the images also load when I previously deployed without [[statics]] does using [[statics]] offer a speed/bandwidth benefit?
Right now the app is only serving static files but in the future if I use SSR would the new url prefix be url_prefix = "/server"?
It should give you some speed and make you have less load as it skips your web server and serves the file directly from our cache system.
I’m not that knowledgeable of NextJS to give you a sure answer (I leave that to our amazing community) but you probably would want to cache only static things (images, js, CSS…) as [[statics]] tells Fly we don’t need to hit your server for these but not cache your paths on the app like yourapp.com/ and yourapp.com/about. Hope this helps