added upload image functionality and resize processing