WordPress / WordPress/performance

Original AVIF files don't get deleted

Open
#2,358 3 comments 1 reaction 1 assignee View on GitHub

@adamsilverstein is already working on this.

Since Jun 19, 2026.

[Plugin] Modern Image Formats [Type] Bug
Dominant language
PHP
Stars
461
Forks
165
Avg merge
11h 12m
Merged PRs (30d)
28

Description

Bug Description

When using Modern Image Formats set to AVIF mode, deleting an image from the media library will delete the original jpg/png files and all the resized AVIF files (thumbnail, medium, large), but not the full/original AVIF file.

Steps to reproduce

  1. Enable Modern Image Formats
  2. Set the format to AVIF
  3. Upload a png/jpg image to the media library
  4. Delete that media item from the library

Additional Context

  • PHP Version: 8.3.27
  • OS: Ubuntu 24.04
  • Browser: chrome/firefox/safari
  • Plugin Version: 4.0.1
  • Modern Image Formats version: 2.6.1
  • Device: any

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.