Skip to content

Issue 5716 - Allow removal of avatar

Ramya Authappan requested to merge github/fork/dblessing/issue-5716 into master

Created by: dblessing

This PR fixes #5716. It adds a remove checkbox to the profile form if an avatar has been uploaded. It also changes the text to indicate that you can remove the avatar to revert to using gravatar. CarrierWaveUploader has support for removing the avatar as long as we expose remove_avatar on the model. See https://github.com/carrierwaveuploader/carrierwave#removing-uploaded-files for more information.

I looked at the existing tests to make sure this wouldn't break anything. I also considered adding a test but I'm not sure if this really adds enough functionality to require a test. We're mostly relying on CarrierWaveUploader features here. I'm open to suggestions, though.

When no avatar is present (same UI as before this PR): gravatar

When an avatar has been uploaded: avatar

Merge request reports

Loading