Various sized gravatar images

How can I produce various sized gravatar image? It seems all images have equal height/width by default.

Is it possible to upload and get back image which do not have square dimensions? Would you please let me know the further info on it?


You can change just height or width of the image, for example if you put an image on the site
<img src=“…” width=“100” alt=“” />

then height of the image will scale properly. On the other hand if you want to modify dimensions you will need to use PHP/GD for this.

For information on how to get at gravatar images, see

Part of the upload process forces you to choose a square part of the image to use. When fetching, if you really want non-square images, fetch the square image and crop the image yourself via CSS, JS or server-side.

Looks a programatically tricky solution:

  • Loading the image as a background image in a non square div.
  • setting its own height/weight
  • positioning the background image correctly.

This too works for me.