SVGs Deleted from File System when Delete Unregistered Sizes Used
timnolte opened this issue · 1 comments
This issue has been opened and explained/tested her: https://wordpress.org/support/topic/all-svg-files-were-removed-after-plugin-work/
From the Forums:
Here is the reproduce bug way:
-
Add SVG to Uploads in the normal way.
-
Regenerate all thumbnails with unchecked both:
[ ] Skip regenerating existing correctly sized thumbnails (faster).
[ ] Delete thumbnail files for old unregistered sizes in order to free up server space. This may result in broken images in your posts and pages.
The result will “Skipped unsupported file format”.
https://www.screencast.com/t/5Miqpuis3
-
Add a new image size, for example: add_image_size( 'test-only', 666, 666, ['center', 'center'] );
-
Repeat the step 2 and after it remove the new image size in PHP.
-
Regenerate all thumbnails with:
[ ] Skip regenerating existing correctly sized thumbnails (faster).
[V] Delete thumbnail files for old unregistered sizes in order to free up server space. This may result in broken images in your posts and pages.
The result will “The full-size image cannot be found in the uploads folder in 2020/04/ logo-visa.svg. Without this image, no new thumbnail images can be generated.”
https://www.screencast.com/t/orxruzqkf
So, here SVG files were gone!
- We have all SVGs in Media are still present, but broken (without a file).
https://www.screencast.com/t/FaVU4OShRjR
https://www.screencast.com/t/sxhArEeE
Perhaps, the root of the problem is in something other. Let’s find a solution. Guys, do only I think it is a critical bug? Imagine, if the production site has a lot of SVGs and all they will go away…
Fixed in #111, to be released in version 3.1.4.