Replace image pipeline with profile-driven variants

- add image normalization profiles and thumbnail profiles
- generate source, full-size variant, and thumbnail image artifacts
- rewrite canonical image URLs through the first configured profile
- emit explicit image Media RSS groups with named thumbnails
- preserve legacy image paths when image conversion is disabled
- cover cache-hit source paths, inline image handling, and thumbnail export
This commit is contained in:
Abel Luck 2026-05-27 09:24:22 +02:00
parent 7316d4723f
commit 525393272e
13 changed files with 1299 additions and 124 deletions

View file

@ -100,6 +100,116 @@ LOG_LEVEL = "INFO"
MEDIA_ALLOW_REDIRECTS = True
REPUBLISHER_IMAGE_NORMALIZE_ENABLED = True
REPUBLISHER_IMAGE_THUMBNAILS_ENABLED = True
REPUBLISHER_IMAGE_DIR = "images"
REPUBLISHER_IMAGE_FULL_SUBDIR = "full"
REPUBLISHER_IMAGE_SOURCE_SUBDIR = "source"
REPUBLISHER_IMAGE_THUMBNAIL_SUBDIR = "thumbs"
REPUBLISHER_IMAGE = [
{
"name": "main_webp",
"mimetype": "image/webp",
"extension": "webp",
"transform": "thumbnail",
"transform_kwargs": {
"width": 1600,
"height": 1600,
"size": "down",
"no_rotate": False,
"linear": False,
"fail_on": "warning",
},
"save": "webpsave_buffer",
"save_kwargs": {
"Q": 82,
"preset": "photo",
"smart_subsample": True,
"effort": 4,
"alpha_q": 90,
"keep": "none",
},
},
{
"name": "fallback_jpeg",
"mimetype": "image/jpeg",
"extension": "jpg",
"transform": "thumbnail",
"transform_kwargs": {
"width": 1600,
"height": 1600,
"size": "down",
"no_rotate": False,
"linear": False,
"fail_on": "warning",
},
"save": "jpegsave_buffer",
"save_kwargs": {
"Q": 85,
"interlace": True,
"optimize_coding": True,
"trellis_quant": True,
"optimize_scans": True,
"subsample_mode": "auto",
"keep": "none",
"background": [255, 255, 255],
},
},
]
REPUBLISHER_IMAGE_THUMBNAILS = [
{
"name": "card_hero",
"mimetype": "image/jpeg",
"extension": "jpg",
"transform": "thumbnail",
"transform_kwargs": {
"width": 640,
"height": 360,
"size": "down",
"crop": "attention",
"no_rotate": False,
"linear": False,
"fail_on": "warning",
},
"save": "jpegsave_buffer",
"save_kwargs": {
"Q": 82,
"interlace": True,
"optimize_coding": True,
"subsample_mode": "auto",
"keep": "none",
"background": [255, 255, 255],
},
},
{
"name": "list_square",
"mimetype": "image/jpeg",
"extension": "jpg",
"transform": "thumbnail",
"transform_kwargs": {
"width": 160,
"height": 160,
"size": "down",
"crop": "centre",
"no_rotate": False,
"linear": False,
"fail_on": "warning",
},
"save": "jpegsave_buffer",
"save_kwargs": {
"Q": 78,
"interlace": True,
"optimize_coding": True,
"subsample_mode": "auto",
"keep": "none",
"background": [255, 255, 255],
},
},
]
REPUBLISHER_AUDIO = [
{
"name": "mp3_vbr7_voice",