Zápisky šíleného jazykového editora

Piwigo gallery – filter photos by a rating score in the Batch Manager

Filter out photos by a rating score to perform some batch operation on them

Datum: 2018-09-09
Kategorie: Guides EN
Štítky: piwigo


If you are using the Piwigo web gallery and wish to filter out photos by a rating score to perform some batch operation on them, you might find that slightly challenging. Even if you’re using the plugin Batch Manager Prefilters, you don’t have any obvious way to filter the photos by a rating in the Batch Manager. I’ve found two ways to work around that.

1st way: search in the Batch Manager

In the Batch Manager, there’s a filter named "Search". You can use that to search for photos with a certain rating score.

Select the Search filter and into the input field that appears insert following: rating:3.96 (change the rating value, of course). Then click "Refresh photo set" and photos with the rating specified should appear.

You can also filter out photos with the rating below/above a certain value. E.g. search query rating:<3 will filter out photos with the rating lower than 3 (probably exclusive).

You can also insert rating:* to filter out all photos with any rating and inversely rating: to filter out photos with no rating.

Strange thing is the filter by exact score doesn’t seem to always work but that might be my mistake in the process somewhere.

2nd way: smart albums

Second way is to create a smart album with a help of the plugin Smart Albums which allows to create virtual albums with photos that meet certain criteria. One criterion available is having a rating above/below a specified value.

After you install the plugin, a new item appears in the Plugins section. In this settings page of the plugin, create a new album, then click Edit, add a new filter "Rating score" and insert desired values.

This will create a standard virtual album containing photos meeting the criterion you’ve specified. You can regenerate the list of the photos in the album when the rating of some photos changes or you add some new photos into your gallery. You can also set automatic regeneration in the settings page of the plugin.

When you have the album created and filled, you can normally go to the Batch Manager, filter out the rated photos by the album you’ve created and perform standard batch actions on the photos in the album.