Added dynamic gif functionality