Below is a quick hack to retrieve and save Gravatars. Gravatar images come in various formats, but we don’t detect them here, just save the retreived image in ‘jpg’ format.
We use the ‘save_gravatars’ function as below.
/* An array of emails of which the Gravatars are to be retrieved */ $email_ids = array("email@example.com, firstname.lastname@example.org"); save_gravatars($email_ids);
You may request images with size anywhere from 1px up to 512px, however users who have lower resolution images will find that requesting larger images will cause pixelation (lower quality) in the retrieved image.