They should always be square. Ideally this should involve some server-side image processing to enforce by scaling and cropping. But, this is just quick & dirty CSS to achieve a grid layout.