Skip to content

WebP images not deleted when saved in backend after edit #375

Closed

Description

@mehulkaklotar

Bug Description

WebP images that are generated when uploaded and edited and saved. When deleted the image, the WebP versions are not being removed from files.

Steps to reproduce

  1. Go to Media, Upload the image
  2. Open the image in backend image editor and rotate it and save the image.
  3. Delete the image completely and check the files.
  4. See that original WebP version of the files are not removed.

Additional Context

  • PHP Version: 7.4
  • OS: MacOS
  • Browser: Chrome
  • Plugin Version: 1.1.0
  • Device: MacBook Pro

Activity

  1. mxbclang commented on Jun 15, 2022

    @mxbclang
    Contributor

    @mehulkaklotar Nice catch! @felixarntz @adamsilverstein Can you please take a look at this and let me know if this is expected behavior and/or something that we should address sooner than later?

  2. felixarntz commented on Jun 15, 2022

    @felixarntz
    Member

    @mehulkaklotar Good catch indeed! I can confirm this is missing from our implementation. We should add support for deleting any backed up sources to our webp_uploads_remove_sources_files() function. It needs to cover:

    • Delete the sources files for each sizes within _wp_attachment_backup_sizes.
    • Delete the sources files from _wp_attachment_backup_sources.
  3. added
    Needs DevAnything that requires development (e.g. a pull request)
    and removed
    no milestonePRs that do not have a defined milestone for release
    on Jun 15, 2022
  4. added this to the 1.3.0 milestone on Jun 15, 2022
  5. removed
    Needs DevAnything that requires development (e.g. a pull request)
    on Jun 27, 2022
  6. added 5 commits that reference this issue on Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions