Skip to content

Feat: Image Deletion, Undo System & Trash(Recently deleted) and restore #795

@Isha-upadhyay

Description

@Isha-upadhyay

Describe the feature

Image

Overview

PictoPy currently lacks a direct image-level deletion workflow and provides no
undo mechanism for destructive actions. This feature proposes a safe image
deletion system with undo support and lightweight action history tracking.


Problem

Currently:

  • No direct image delete option exists in the gallery UI
  • Image removal is mostly handled indirectly via albums
  • Database-level deletion performs irreversible hard deletes
  • No undo or action history is available

This makes image management inconsistent and risky, especially for accidental
or bulk actions.


Proposed Solution

🗑️ Image Deletion

  • Introduce a gallery-level image delete option
  • Support single and bulk image deletion
  • Replace hard deletes with soft delete (deleted_at / is_deleted)
  • Ensure deleted images are removed from albums and related metadata

↩️ Undo Support

  • Allow users to undo recent destructive actions
  • Initial scope:
    • Image deletion
    • Image removal from albums
  • Undo can be limited to recent actions (time-based or count-based)

📚 Recently Deleted

All the deleted image store in trash and from here user can restore it or delete permanently .
else the image will deleted after 30 days automatically.


Suggested API Design (Indicative)

DELETE /images/{image_id}
POST /images/bulk-delete
POST /images/{image_id}/restore
POST /actions/undo
GET /actions/history

Willingness to Work

@rahulharpal1603 sir I would like to work on implementing this feature.

Add ScreenShots

There is not undo support and deletion feature in the frontend or backend .

Record

  • I agree to follow this project's Code of Conduct
  • I want to work on this issue

Checklist before Submitting.

  • Have you updated docs for it?.
  • Have you added unit tests?.
  • Have you made sure unit tests pass?
  • Have you made sure code formatting is correct?
  • Does it contain any style related issues?

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageThe maintainer needs time to review this issue. Please do not begin working on it.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions