Open otobot1 opened 10 months ago
Resolving #531 would also resolve this issue, as then we could simply serve the GameBanana images using Next.js's Image component. Right now, we are unable to use it to server external images. We receive this error due to being unable to edit next.config.mjs
.
Is your feature request related to a problem? Please describe. This uses certain external resources, primarily images from GameBanana. Right now, these are requested directly in the client and are cached only by the browser. For the sake of minimizing the load this project puts on Gamebanana, caching should be improved.
Describe the solution you'd like Implement Next.js's Image component for GameBanana images and verify that this implements server-side caching of the images.
Describe alternatives you've considered
Cache the image files directly on the backend server. Write them to disk, and write the file names to the database. Best way is probably to create a
ModImage
table that hasid
,modId
, andimagePath
columns and add animageExpires
timestamp column to theMod
table. The frontend can then grab the image using the tRPC API, which will handle frontend caching.We could implement only frontend caching. This wouldn't minimize the hit to GameBanana nearly as much, but it would still be a good first step. EDIT: #764
Additional context N/A.