Yeah resizing, if the image is larger than 25 MB, then my script gradually reduces the quality, checking the file size after each attempt. I use a node compression library called sharp that you can specify the quality value and I keep reducing it until the image fits the 25 MB and I loop this logic for all images.