How to limit uploaded file size

Hi, Is there a way to limit the size of the photos that the user uploads to the app?
Thanks