-
Notifications
You must be signed in to change notification settings - Fork 35
delete old image and gif not playing #69
Comments
now i commented these to disable the resize that making gif not work properly |
to be able to delete old images i had to override the images so i removed the $number from $base_name and removed the $ext so the name will be same no matter what the type of the image is :) |
Thanks for sharing this with us @Rise-KuN, would it be possible for you to submit a Pull Request for these changes so we may overlook it and try get it merged in? |
Sure, and sorry for late reply, first i disable the resize like i said to keep the original size and make the size full then i added support for webp: also in public function unique_filename_callback( $dir, $name, $ext ) { this is the edited version i use right now basic-user-avatars.zip |
i noticed that there is no filters for image size also the resize is making the gif not playing
and if i change the image or back to Gavatar the images that i uploaded doesn't get deleted from media.
in "public function avatar_delete( $user_id )" i added this line "wp_delete_attachment( $user_id, $old_avatars );" before "delete_user_meta( $user_id, 'basic_user_avatar' );"
now when i check "delete avatar": all the image that i uploaded gets deleted but...
if i upload another avatar without checking "delete avatar" the old image doesn't get deleted from media.
The text was updated successfully, but these errors were encountered: