gravatarSize", $value, ); if ($this->gravatarSize > 50) { // twitter $value = str_replace('_normal.jpg', '.jpg', $value); } return $value; } // relative link (for new and legacy urls) if ($value) { return Storage::disk('public')->url( str_replace('storage/', '', $value), ); } // gravatar $hash = md5(trim(strtolower($this->email))); return "https://www.gravatar.com/avatar/$hash?s={$this->gravatarSize}&d=retro"; } /** * @param number $size * @return BaseUser */ public function setGravatarSize($size) { $this->gravatarSize = $size; return $this; } }