Internal Server Error when uploading a profile photo

Nextcloud version: 19.0.1
Operating system and version: Linux 5.7.12-1.el7.elrepo.x86_64 x86_64
Apache/nginx version: Where do I find this information? I’m on shared hosting and only have ftp access + access to the web interface (LiveConfig).
PHP version: 7.3.21

The issue you are facing:
I’m getting a 500 Internal Server Error when trying to upload a profile photo.

Is this the first time you’ve seen this error? Yes, I just set up the instance

Steps to replicate it:

  1. Go to settings in order to change your profile photo.
  2. Select a file.
  3. The error occurs:


The output of your Nextcloud log in Admin > Logging:

[PHP] Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 16384 bytes) at /cloud/lib/private/legacy/OC_Image.php#647

POST /index.php/avatar/
    from [IP removed] by user at 2020-08-16T11:48:58+00:00

If it only tried to allocate 16384 bytes, which is less than 67108864 bytes, why am I seeing this error?

Thank you very much for reaching back.