mirror of
https://github.com/searxng/searxng.git
synced 2025-07-14 16:59:21 +02:00
[refactor] images: add resolution, image format and filesize fields
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
b683aa63fb
commit
e76ab1a4b3
15 changed files with 91 additions and 33 deletions
|
@ -110,7 +110,7 @@ def response(resp): # pylint: disable=too-many-branches
|
|||
continue
|
||||
|
||||
img_src = size_data['url']
|
||||
img_format = f"{size_data['width']} x {size_data['height']}"
|
||||
resolution = f"{size_data['width']} x {size_data['height']}"
|
||||
|
||||
# For a bigger thumbnail, keep only the url_z, not the url_n
|
||||
if 'n' in photo['sizes']['data']:
|
||||
|
@ -131,7 +131,7 @@ def response(resp): # pylint: disable=too-many-branches
|
|||
'img_src': img_src,
|
||||
'thumbnail_src': thumbnail_src,
|
||||
'source': source,
|
||||
'img_format': img_format,
|
||||
'resolution': resolution,
|
||||
'template': 'images.html',
|
||||
}
|
||||
result['author'] = author.encode(errors='ignore').decode()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue