Orphaned webp files when use media library delete permanently
-
I am using plugin Enable Media Replace. Here is LiteSpeed report# ZKGYPZSJ. My setup is to not optimize files, but to generate webp, and replace img/srcset/background: url/etc with webp. I have many optimized groups, but it looks like currently my queue is paused, but that’s another issue..
Here’s my notes and procedure to create orphaned webp files:
I saved an image-to-replace file and added to media library. I created a test page and used devtools to verify the image was replaced with filename.jpg.webp image, and that the the header reported type as webp. Found documentation that says some images are not replaced with webp if the jpg size is smaller than the webp size. Ok. I then opened the image details in the Media Library and used Replace media > Uploaded a new file, to upload “replace-image.jpg”. Used Replacement Options > Just replace the file, and Options > Keep the date. LiteSpeed Cache > Image Optimization > Image Optimization SummaryOptimization Status, showed Images ready to request: 1 group (7 images)”. It took like 30 minutes, but now all images, including webp have been replaced with the new image. Permanently deleted the image using Media Library, and while all JPG images are gone, the optimized jpeg.webp images are still there, but now orphaned – see “replace-image.jpg.webp”.
- The topic ‘Orphaned webp files when use media library delete permanently’ is closed to new replies.