Resize pictures for emails

Some resources found by searching the internet. Not tested. Use at your own risk