- Edited
make a folder on your web server called avatar upload images that are 80x80 pixels put the Agents' email address in the file names, example: example@monkeybrains.net.jpg patch the avatar file!Here is the ugly patch, that I hope to do better in the future. Basically, it checks the local folder for the files, if it is there, it skips the gravatar.This is a unified diff (research online if you don't know what to do with this format)--- class.avatar.php-orig 2018-06-06 00.134163000 -0700+++ class.avatar.php 2018-06-06 00.981905000 -0700@@ -231,9 +231,25 @@ */ function getUrl($size=null) { $size = $this->size ?: 80;+ // here is the 'checkLocal' intercept. Also, we can cache gravatar results.+ $url = $this->checkLocal();+ if (isset($url)) {+ return $url;+ } $url = '//www.gravatar.com/avatar/'; $url .= md5( strtolower( $this->email ) ); $url .= "?s=$size&d={$this->d}"; return $url; }+ /**+ * Check to see if you have a local avatar+ * TODO: make an staticFileAvatar class and redo this.+ * For now, just intercept Gravatar as I don't know where the call is in the osTicket code.+ */+ function checkLocal() {+ $file = "../avatar/".strtolower($this->email).".jpg";+ if (is_readable($file)) {+ return $file;+ }+ } }