[mod] add new category 'stock_images' - a specialization of 'images' (#6703)

Engines like Pexels provide images that one would more likely expect in a
category named ``stock_images``.

By classifying engines like Pexels more precisely, we enable a more specific
handling of them, which also helps to avoid mixing them with the more general
image search on the internet. [1]

We leave these engines *enabled* by default, take them out of ``images`` and
move them into the specialization ``stock_images``.

This makes it possible, on the one hand, for the admin to configure a tab in the
UI, and on the other hand, the user can always select the group directly using
the search syntax ``!stock_images ...``.

What we need to keep in mind:

1. Technically speaking, there are no subcategories in the strict
   sense.  Organizationally, the *subcategories* are derived from the
   `categories_as_tabs`.

2. From an admin’s perspective, `categories_as_tabs` is the tool for
   structuring their content.

3. In the context of “enabled/disabled by default”: We should avoid having
   the admin have to activate many individual engines when they want to
   structure their content (UI tabs).

So if we leave an engine enabled by default and **move** it from `images` to a
new category, the admin only needs to add the new category to
`categories_as_tabs` to restructure their content.  If the new category is also
part of the translations (see `searx/searxng.msg` in this PR), this UI structure
would also be available internationally.

[1] https://github.com/searxng/searxng/pull/6690#issuecomment-5646291679

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser
2026-09-16 17:03:33 +02:00
committed by Markus Heiser
parent 1f7711ef1f
commit 280aceb1ae
10 changed files with 11 additions and 15 deletions

View File

@@ -33,7 +33,7 @@ about = {
base_url = "https://500px.com" base_url = "https://500px.com"
api_url = "https://api-neo.500px.com" api_url = "https://api-neo.500px.com"
categories = ["images"] categories = ["stock_images"]
paging = True paging = True
results_per_page = 30 results_per_page = 30

View File

@@ -18,7 +18,7 @@ about = {
"results": 'JSON', "results": 'JSON',
} }
categories = ['images'] categories = ["stock_images"]
page_size = 15 page_size = 15
paging = True paging = True

View File

@@ -26,7 +26,7 @@ about = {
} }
base_url = "https://www.pexels.com" base_url = "https://www.pexels.com"
categories = ["images"] categories = ["stock_images"]
api_key = "H2jk9uKnhRmL6WPwh89zBezWvr" api_key = "H2jk9uKnhRmL6WPwh89zBezWvr"
""" """

View File

@@ -26,7 +26,7 @@ about = {
base_url = "https://picjumbo.com" base_url = "https://picjumbo.com"
categories = ["images"] categories = ["stock_images"]
paging = True paging = True

View File

@@ -25,7 +25,7 @@ about = {
base_url = "https://www.shopify.com" base_url = "https://www.shopify.com"
categories = ["images"] categories = ["stock_images"]
paging = True paging = True

View File

@@ -25,7 +25,7 @@ about = {
base_url = "https://stocksnap.io" base_url = "https://stocksnap.io"
cdn_url = "https://cdn.stocksnap.io" cdn_url = "https://cdn.stocksnap.io"
categories = ["images"] categories = ["stock_images"]
paging = True paging = True

View File

@@ -18,7 +18,7 @@ about = {
base_url = 'https://unsplash.com/' base_url = 'https://unsplash.com/'
search_url = base_url + 'napi/search/photos?' search_url = base_url + 'napi/search/photos?'
categories = ['images'] categories = ["stock_images"]
page_size = 20 page_size = 20
paging = True paging = True

View File

@@ -17,7 +17,7 @@ about = {
} }
# engine dependent config # engine dependent config
categories = ['images'] categories = ["stock_images"]
paging = False paging = False
# search-url # search-url

View File

@@ -31,6 +31,7 @@ CATEGORY_NAMES = {
'MUSIC': 'music', 'MUSIC': 'music',
'SOCIAL_MEDIA': 'social media', 'SOCIAL_MEDIA': 'social media',
'IMAGES': 'images', 'IMAGES': 'images',
'STOCK_IMAGES': 'stock images',
'VIDEOS': 'videos', 'VIDEOS': 'videos',
'RADIO': 'radio', 'RADIO': 'radio',
'TV': 'tv', 'TV': 'tv',

View File

@@ -280,6 +280,7 @@ plugins:
categories_as_tabs: categories_as_tabs:
general: general:
images: images:
# stock_images:
videos: videos:
news: news:
map: map:
@@ -304,7 +305,6 @@ engines:
- name: 500px - name: 500px
engine: 500px engine: 500px
shortcut: "500" shortcut: "500"
disabled: true
timeout: 5 timeout: 5
- name: 9gag - name: 9gag
@@ -920,7 +920,6 @@ engines:
engine: www1x engine: www1x
shortcut: 1x shortcut: 1x
timeout: 3.0 timeout: 3.0
disabled: true
- name: fastbot - name: fastbot
engine: xpath engine: xpath
@@ -1005,7 +1004,6 @@ engines:
disabled: true disabled: true
- name: flickr - name: flickr
categories: images
shortcut: fl shortcut: fl
engine: flickr_noapi engine: flickr_noapi
@@ -1875,7 +1873,6 @@ engines:
- name: picjumbo - name: picjumbo
engine: picjumbo engine: picjumbo
shortcut: pj shortcut: pj
disabled: true
- name: pinterest - name: pinterest
engine: pinterest engine: pinterest
@@ -1916,7 +1913,7 @@ engines:
- name: pixabay images - name: pixabay images
engine: pixabay engine: pixabay
pixabay_type: images pixabay_type: images
categories: images categories: stock_images
shortcut: pixi shortcut: pixi
disabled: true disabled: true
@@ -2173,7 +2170,6 @@ engines:
- name: shopify stock - name: shopify stock
engine: shopify_stock engine: shopify_stock
shortcut: shs shortcut: shs
disabled: true
- name: sogou - name: sogou
engine: sogou engine: sogou
@@ -2208,7 +2204,6 @@ engines:
- name: stocksnap - name: stocksnap
engine: stocksnap engine: stocksnap
shortcut: sto shortcut: sto
disabled: true
- name: askubuntu - name: askubuntu
engine: stackexchange engine: stackexchange