• First, thanks for the great plugin!
    I happiliy switched from NGC 2 since the bad performance, bugs (EXIF date parsing broken again, really?) and the usability got on my nervers.

    Is there a way to find images in galleries that are not used on any page or post?
    I have yearly galleries (which are not accessible directly) for images put in blog posts (mostly singlepic), and if an old post is deleted, I’d like to also find and remove the now unused images from the respective gallery.

    post_id and extras_post_id are mostly 0 in the ngg_pictures table.

    I might write a script once to do such a thing, but I first wanted to ask if there’s already a solution or idea for that. ??

    https://www.ads-software.com/plugins/nextcellent-gallery-nextgen-legacy/

Viewing 1 replies (of 1 total)
  • Hi Simon,

    First of all, sorry for the long delay in responding.

    Secondly, this option is not available, as there is no reliable way of finding if an image is used or not. The columns in the database are only one way a gallery can be used, and they are only used in a small percentage of the case.

    Most usage comes from shortcodes. These are only rendered/resolved when a post is viewed by someone (similar to on demand). This has a side-effect, which is that we don’t know if a gallery is used or not.

    One possible solution would be to search all posts for NextCellent shortcodes and compile a list of all used gallery ID’s, and then you could remove the non-used galleries.

Viewing 1 replies (of 1 total)
  • The topic ‘Find unused images’ is closed to new replies.