Skip to content

Custom User Avatars FAQ

Which files can customers upload?

Image files up to 2 MB. The file picker offers PNG, JPG and WebP. The limit is fixed in the code.

Can I change the size limit or restrict file types?

Not in the admin area. The extension has no settings.

Can a customer delete their avatar?

No. They can only upload a new picture, which replaces the old one.

Do admins or other customers see the uploaded picture?

No. The picture is swapped in for the logged-in customer on their own client-area pages. The admin area and other users still see the Paymenter default avatar for that account.

The upload works, but the picture does not load

  • Check that public/storage exists. If not, run php artisan storage:link in the Paymenter root.
  • Check that APP_URL in .env matches the address customers use, including https. The picture address is built from it.
  • Check that the file exists under storage/app/public/avatars/user-<user id>/.

Uploads above a certain size fail although they are under 2 MB

PHP or your web server may allow less than 2 MB per upload. Check upload_max_filesize and post_max_size in PHP and the request size limit of your web server.

The Profile picture box does not show up

  • The box is only added on pages whose address starts with /account, and only for logged-in users.
  • Make sure the extension is switched to Enabled.
  • The box and the avatar swap are added by a script before the closing </body> tag. Pages without that tag, or a browser with JavaScript disabled, get neither.

The navigation avatar does not change with my theme

The swap looks for images by alt text and CSS class (see Usage). If your theme's avatar image matches none of those rules, it is not replaced. Adding a data-avatar attribute or a class containing avatar to the image in your theme makes it match.

Other pictures on the page turned into my avatar

Any image whose CSS class contains "avatar" or "profile" is replaced with the logged-in customer's picture. If your theme uses such classes for other images, for example other people's pictures, those are replaced too.

Where is the data stored, and what happens on uninstall?

Files are in storage/app/public/avatars. The file path of each user is saved in Paymenter's properties table with the key profile_avatar_path. Neither is removed when you disable or uninstall the extension. See Installation.

Does the extension show under a different name in the admin area?

In the install list it appears under its folder name, UserAvatars.