You could use the image size params to automatically resize your images, please have a look at: https://shopify.dev/docs/themes/liquid/reference/filters/url-filters#size-parameters.
Thats helpful, thx. Didn't know image params could actually crop an image. Is there any way to add whitespace rather than crop? I got an app for that, but would love to do it without the app as it charge by the images (10k images are a lot to pay for). So rather than use params to crop, I would like to extend whitespace (or switch background color from white to grey).