prepare images before you upload