wrap thread to upload images