Search code examples
next.jsvercelgit-lfs

NextJS/Vercel not serving .mp4 file in public folder in production


I have a video.mp4 file in my public folder in a NextJS app. When running Next locally (npm run dev) I can reach the file by typing localhost:3000/video.mp4 but once I push to Vercel mydomain.com/video.mp4 doesn't work. I have used Git LFS to push the video file because it was over 100mbs. I have other static files in my public folder such as images and icons and these work perfectly well in both development and production environments.

I have no clue what to do. Any ideas?


Solution

  • Vercel currently does not support Git LFS. We recommend hosting that video asset elsewhere.

    https://vercel.com/support/articles/best-practices-for-hosting-videos-on-vercel-nextjs-mp4-gif