Yes, Gmail also compresses photos that are attached to emails. Like other email providers, Gmail aims to optimize email performance and deliverability by reducing the file size of images.