able to compress the uploaded image when its size is larger than assigned size