diff --git a/crates/api_common/src/request.rs b/crates/api_common/src/request.rs index 6f1a86e0a..9bfb97b72 100644 --- a/crates/api_common/src/request.rs +++ b/crates/api_common/src/request.rs @@ -345,8 +345,9 @@ pub async fn replace_image( context: &Data, ) -> LemmyResult<()> { if let (Some(new_image), Some(old_image)) = (new_image, old_image) { - // Note: Oftentimes front ends will include the current image in the form, - // so only delete if the urls are different. + // Note: Oftentimes front ends will include the current image in the form. + // In this case, deleting `old_image` would also be deletion of `new_image`, + // so the deletion must be skipped for the image to be kept. if new_image != old_image.as_str() { // Ignore errors because image may be stored externally. let image = LocalImage::delete_by_url(&mut context.pool(), old_image)