I'm trying to set up dynamic routes rendered on the server-side that query the assets of the application (in the public directory). However, there's a difference in behavior between on-demand dynamic routes and generated routes (with generateStaticParams). Apparently, querying the assets only works when it's a route generated at build time. I'd like to understand why it's happening
My context: I'm trying to generate blurred images to show as image loaders, which is why I need to access the files within the public directory.
Live example: https://nextjs-image-loading.vercel.app/ (the broken pages are the ones with on-demand in the URL)
Repository: https://github.com/dpnunez/nextjs-image-loading/tree/main