Skip to content

Add image labels for performer images - #1215

Open
Maista6969 wants to merge 5 commits into
stashapp:masterfrom
Maista6969:performer-image-labeling
Open

Add image labels for performer images#1215
Maista6969 wants to merge 5 commits into
stashapp:masterfrom
Maista6969:performer-image-labeling

Conversation

@Maista6969

@Maista6969 Maista6969 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

This PR provides two new features: performer images can be labeled and dated, and users of a stash-box can express their preferences for which images they'd like to see both when browsing and when scraping performers.

As discussed in #237 I opted for a closed taxonomy of types for the primary reason of compatibility: having a canonical set of labels for images means that users can use their preferences across multiple stash-boxes. Having users configure their preferences on the stash-box itself serves to simplify the rollout: if we had to rely on users configuring their preference in Stash then we'd need to coordinate releases, have Stash send an ordering whenever it scrapes a performer and also be more careful about backwards compatibility.

The taxonomy is intentionally wide because stash-box administrators can choose to disable the types they do not want to use for their labeling (maybe you think 3-quarters plus is excessive), and even disable entire groups (like dress because your instance doesn't have a lot of nude performers). When a label is disabled nothing is deleted: it is still present on any images that had it before the label was disabled, it is simply "inert" for the purposes of sorting images. Re-enabling the type brings the label back for all purposes.

There is an exception to the user-preferred ordering of images and that's search results, mostly because of their size: at such a small scale I believe we should prefer headshots since they stay readable at much smaller sizes. Performer images in search results will always use a face crop if the performer has one, otherwise it falls back to whatever it would have gotten before this feature was added. This affects the performer field in scene edit forms and the site-wide search in the top right corner of the app.

I believe this resolves:

For the reviewer(s):

This is a lot of code to review, so I've split the work into commits that can (hopefully) be reviewed in order. The very first commit adds new entries to .gitattributes to help GitHub know which files are autogenerated so that they'll be collapsed in the diff view by default. This won't help this PR but for future work it should be helpful.

I've added tests, integration tests and end-to-end playwright tests for this feature, and while they're bot-assisted I've seen each of them fail in my development environment so at least there are no duds in there.

AI Disclosure

I had Claude Opus look over the plan and assist with writing tests for this PR

Follow-up work

@Maista6969
Maista6969 force-pushed the performer-image-labeling branch from a221ba4 to 7ea0859 Compare August 27, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant