mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Clear image (#722)
* Allow clearing of tag images * Allow clearing of studio images * Allow clearing of performer images * Allow clearing of movie images * Add filtering for missing images
This commit is contained in:
@@ -27,6 +27,12 @@ func (rs performerRoutes) Image(w http.ResponseWriter, r *http.Request) {
|
||||
performer := r.Context().Value(performerKey).(*models.Performer)
|
||||
qb := models.NewPerformerQueryBuilder()
|
||||
image, _ := qb.GetPerformerImage(performer.ID, nil)
|
||||
|
||||
defaultParam := r.URL.Query().Get("default")
|
||||
if len(image) == 0 || defaultParam == "true" {
|
||||
image, _ = getRandomPerformerImageUsingName(performer.Name.String, performer.Gender.String)
|
||||
}
|
||||
|
||||
utils.ServeImage(image, w, r)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user