After changing my avatar, I got an 500 error while getting friends_timeline.json. My error_log said PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 3096 bytes) in /var/lib/gnusocial/lib/imagefile.php on line 318
the code around line 318 is if ($this->rotate != 0) {             $image_src = imagerotate($image_src, $this->rotate, 0);         }
following @nbd 's solution worked for this case. https://gnutan.xyz/notice/75465
!gnusocial