fixed issue with large gifs,  but has depenedancy on both im and gm, also large gifs, are slow