Long story short, I have over 500 images that unfortinately are 4320 x 3240. I am using them in a website and they need to be 1:1 (perfect square). All images are just pictures of eyewear with a plain background and placed close to the bottom and are fitted on the left and right so you cannot crop out the left and right sides to make it square. I've inlucded a sample picture bloew.

I've been using GIMP going one by one but not only does it take forever, some of them look sloppy. I was extending the canvas to be 4320 x 4320, therefore adding white space under the image. I then selected a thin strip at the bottom of the image from the left edge to the right edge (full horizontal width) and then scaling it down over the white space. This method is a pain and then two doesn't always work. There are picutes in which the shadows from the eyewear go to the bottom of the image and then I am forced to include them in the thin strip which gets scaled over the white space and that streched shadow doesn't look too good. Here is an example of what I mean when the shadow gets scaled/streched out.

Is there a way in which I can square out an image and make the height and width 1:1 without having a white block? Most images the bottom of the pic can be used to fill in the new space after being squared but its a lot to do manyally. I am open to other suggestions as well so It doesn't have to do this way, but the only requirement is that the images become square.
I am also trying to figure out how to convert multiple images in one shot. I found a command lin syntax that adds white space under the photo making it 1:1 but not sure how to do all 500+ photos in one command line.