Can you send me your pages that were generated so I can test and verify that the image upload is being modified to be only 40kb? Is the thumbnail being uploaded correctly?
Also, attach the image you're uploading, so I can try testing on the specific image.