#Is it possible to have static image URLs?
1 messages · Page 1 of 1 (latest)
You can place images in the public folder but they won't be optimized.
You can also generate images with an endpoint, which is how I handle OpenGraph images in my projects.
There might be some other ways too... but by default optimized images will be hashed.
Dang, alright. I think might try the endpoint approach. It just kind of sucks that all the hashes might change at some point in the future. The hashes seem to have changed with the latest minor version change, but I could be mistaken
Yeah, you can't depend on those hashes remaining constant. If you change some of the arguments the output will change. Endpoints work pretty well if it's OG images you're looking for. If you are hosting images that are being referenced elsewhere... well, I suppose you could also just write a little post-build script to strip out the hash using regex. (I have a similar script for removing built images that don't end up referenced in my project at all, usually high-resolution originals that are just taking up space.)