handle gifs and transparency better