The problem is that sometimes when the images are large, an error occurs. Is it possible to somehow take the photographs that are uploaded and reduce their size so that it is the maximum allowed by P. Apps?.

Yes, you can reduce the size of uploaded images in PowerApps before sending them via email. Here are a few approaches:
PowerApps provides an inbuilt function to resize images before saving or sending them.
When using an Add Picture control (Image1), set its OnChange property to:
ClearCollect(
colCompressedImages,
{
ImageData: UploadedImage1.Image,
CompressedImage: Substitute(JSON(UploadedImage1.Image, JSONFormat.IncludeBinaryData), """", "")
}
)
Use CompressedImage in Power Automate instead of the raw image.
Instead of embedding full-sized images, you can adjust their size using the Resize function:
Resize(UploadedImage1, 500, 500)
This resizes the image to 500x500 pixels, reducing file size.
If using JSON format to send images, reduce image quality:
JSON(Resize(UploadedImage1, 500, 500), JSONFormat.IncludeBinaryData)
This keeps the image under control while keeping it embeddable in HTML.
If images are still too large: