We've been deleting the image before we can check if it exists, and then rename it to flush any cache that could be on that image.
Instead, I've added in a filter called basic_user_avatar_delete_avatar_before_upload which is set to false by default. This ensures that if you upload more than one image, we rename it and increment the number (image below)
If set to true, it will delete the existing image and upload a file with the exact same file name. Cleaner approach but does cause issues on sites with caching.
Relates to Issue #43
We've been deleting the image before we can check if it exists, and then rename it to flush any cache that could be on that image.
Instead, I've added in a filter called
basic_user_avatar_delete_avatar_before_upload
which is set to false by default. This ensures that if you upload more than one image, we rename it and increment the number (image below)If set to true, it will delete the existing image and upload a file with the exact same file name. Cleaner approach but does cause issues on sites with caching.