Customize the loading icon

how do i replace it with a gif. for example: