created image upload resize functionality