I will fully admit I’m not a Gatsby genius; most of my Netlify SSG experience has been with Hugo.
We have things set up for image optimization, which to my understanding, means that Netlify will serve the images from the cloundfront CDN and fingerprint/rename the images, rewrite the HTML/CSS, etc to use them.
However, all the images are coming from the root domain, so they aren’t getting any of that love. This is especially rough with things like social cards, which could change, and then they are cached by Twitter, etc
For Hugo, the way I did this was to have the build command pass in the
BaseURL and I have it pass in different values if it’s a deploy preview or the public site, etc.
Anyway, without hacking the way I did it with Hugo, is there a good practice for Gatsby to get these images to work properly with the asset optimization?
Netlify site name: https://graceful-sage-db0ff.netlify.app/
Netlify configuration: devopspartygames-web/netlify.toml at main · DevOpsPartyGames/devopspartygames-web · GitHub