Resize image and decode uploaded file