diff --git a/settings/js/personal.js b/settings/js/personal.js index b6e8e2ff50..09f63f3f6a 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -110,8 +110,15 @@ function updateAvatar (hidedefault) { } $displaydiv.css({'background-color': ''}); $displaydiv.avatar(OC.currentUser, 145, true); - - $('#removeavatar').removeClass('hidden').addClass('inlineblock'); + $.get(OC.generateUrl( + '/avatar/{user}/{size}', + {user: OC.currentUser, size: 1} + ), function (result) { + if (typeof(result) === 'string') { + // Show the delete button when the avatar is custom + $('#removeavatar').removeClass('hidden').addClass('inlineblock'); + } + }); } function showAvatarCropper () {