When uploading images to Cloudinary you can specify the dimension and crop on upload.
Steps to follow when uploading from the UI or client-side:
1. Create an upload preset. Go to https://cloudinary.com/console/settings/upload and click on Add upload preset.
2. Navigate to Upload Manipulations and specify the dimensions in terms of width and height of the image.
In this example, I have taken a square of dimension 500 with gravity auto so that it crops and focuses on the main part of the image. More information about gravity here:https://support.cloudinary.com/hc/en-us/articles/360024950012-How-to-Apply-Gravity-Based-Crops-on-Images-with-Cloudinary
3. Once saved. Set this as your Media Library preset or in case if you are uploading from client-side use this preset as the unsigned upload preset.
Tadaa.. images uploaded now on will automatically be cropped square :)
This can also be achieved using the API by specifying the incoming transformation on upload.