Next.js Discord

Discord Forum

Performance for GIF

Unanswered
Asiatic Lion posted this in #help-forum
Open in Discord
Asiatic LionOP
Hi
I need help with gif format, its took to much time loading GIF when app opened: my web app: https://movemnt.digital/ on this site its faster loaded: https://chandeliercreative.com/
how can I improve my performance? I already give priority to load this GIFs first.
Could it be cause of vercel?

4 Replies

Toyger
you are using gif, they are using mp4
you need at least gifv format, because gif encode each frame separately and your file is almost 100MB in size which a lot for any site, with gifv or mp4 it will be max 5MB in size
Asiatic LionOP
but will I be able to use next/image with gifv? or it should be substitute to <video />?
Toyger
yeah it should be substituted with <video>, vercel doesn't provide any optimizations on video, so you need to compress it yourself, it's better to compress it with h265 codec, you can compress it with some either ffmpeg or some online sites that provide video compression, or easiest is upload to youtube and then download it from there.