Replies: 1 comment 1 reply
-
|
Hey, Good job with the script. This is a great suggestion. I think this could be its own settings button, in a "Danger Zone", type of section. With a "Remove unused images" button, and a dialog: "Warning: all images that are NOT present in your documents will be deleted. Please, make sure you are not deleting images that are part of your website. If you keep all images (website logo, graphics, ...) on the same directory as your Outstatic media, this action will delete them." Keep in mind that actions in Outstatic are always committed to GitHub, I don't want to make some actions locally and others committed, to not generate any confusion. Until we create a "local saving" feature. As an alternative, perhaps a multi-select on the media library page for deleting multiple images at once might be a better starting point. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I wrote a script I run every once in a while which basically check all content and delete images from
public/imagesif they're not referenced anywhere.I realized that on v1 that would work perfectly, but on v2, the
media.jsonwould still reference them. Of course I can adapt my script to ensuremedia.jsonstays up to date, but I was thinking that the rebuilding metadata button could also reindex the image and prune missing images frommedia.json?WDYT?
Beta Was this translation helpful? Give feedback.
All reactions