simple-local-avatars icon indicating copy to clipboard operation
simple-local-avatars copied to clipboard

Option to prevent media deletion

Open jeffpaul opened this issue 5 years ago • 2 comments

Is your enhancement related to a problem? Please describe. We received the following from @zalemcitizen on WordPress.ORG:

Hello,

I find hard that the only way to remove avatar from user is to use ‘delete local avatar’ button which deletes completely avatar image. I need to remove avatar choice from user but keep the file in Media library because it may be used elsewhere.

Could you add a simple cross or button to break link between user and media object ?

Describe the solution you'd like

Ability to select "delete" or "remove" local avatar where "delete" completely deletes the image and "remove" retains the image file in the media library and just disassociates it from the user.

Designs

Describe alternatives you've considered

Additional context

jeffpaul avatar Jan 29 '20 20:01 jeffpaul

I'm having the opposite problem, where I hit the delete local avatar and the file does not get deleted.

Shirkit avatar Aug 16 '20 22:08 Shirkit

@Shirkit it looks like your issue is more aligned with what's been described in #55, you might subscribe to that issue instead and follow the discussion/triage/resolution there... thanks!

jeffpaul avatar Aug 19 '20 14:08 jeffpaul

@jeffpaul

I'm a bit concerned whether keeping the images on the server is an ideal solution or not. If there are lots of users and they frequently update avatar, then there will be a lot of unused images. And the possibility of the usage of obsolete images elsewhere will be very low.

My proposition is to keep it currently what it is, rather exclude images uploaded by users from media picker. So there'll be no chance of using their images elsewhere. And storage will remain optimized no matter how frequently they update avatar.

Please let me know what you think.

jayedul avatar Dec 13 '22 07:12 jayedul

@jayedul yeah, it will be helpful to optimize the storage but as per the original issue, they want to "keep" the avatar in the media and may use it somewhere else. In your logic, (if I understood it correctly) we will keep deleting the old avatar when a new one is added.

but keep the file in Media library because it may be used elsewhere.

faisal-alvi avatar Dec 14 '22 07:12 faisal-alvi