the upload behavior has a resize option to it, and there is also image resizer, both in data Bridge.
"to compress them if larger"
the problem with this is that need to be uploaded to the server before they can be compressed, so compressing them does not prevent the files from uploading if they are to big.
see the Archived documentation section of the Universal Email support page for a tutorial on attaching files in Universal Email.