Mostly you would need to cut either quality or pixels from your 40MB image to make it <25MB. If it is something like 90% Quality JPEG at 40MB (or is it loss-less?) it can hit your mark with a 72-75% quality setting.
Much like how the PNG format has tools like PNGCrush
to improve the way compression encoding is done without affecting quality or size, JPEG can make use of programs like JPEGmini or MozJpeg which optimizes for screen viewing with good defaults, a minimal container, and arithmetic coding over Huffman-coding, or improved tables for the Huffman-coding (respectively). Also there's a bunch of optional data in JPEGs (you likely know about the Exif metadata) like more bits per channel (12bit color), preferences in color profiles, comments, fill bytes, progressive loading, and oh my, sometimes a camera's Exif metadata includes a thumbnail for the cameras GUI, an uncompressed one. Various tools can help you streamline this stuff out, but look at the aforementioned.
There are many online websites like https://compress-jpeg.online , https://tinyjpg.com/ which reduce the overall size of images with no real difference in quality
– beginner – 2018-08-25T11:13:23.630Which operating system are you using? If it's Windows, an easy way is to use Microsoft Picture Manager – prrao – 2012-06-07T02:54:13.573
Just use 7zip to split the archive into multiple parts, and send two separate attachments. Extracting one part of the archive will automatically prompt for the other one, and will reconstruct the original file. – Breakthrough – 2012-12-21T00:48:56.527