resizes the images before those are uploaded