Upload images via ajax. Images are optionally resized.