I mean this very lightly, but using a YouTube video that has no sound, along with the auto-play feature, can sometimes pass instead of using a GIF file.
For example, one site using auto-play with no sound: https://gdevapp.com/
Given the length of the video there, GIF might not be feasible. That YouTube clip provides a better option. It could also potentially draw people in to the YouTube channel for similar videos.
There are lots of cases where GIF will be better, but there are cases like the above where an auto-played YouTube video is optimal.