handle gif images and reset image counter for each image that is cut into thumbnails