Added image loading to animation definition