fix: Krea-Bild-URLs auf /api/images/file/ korrigieren, Thumbnail-Endpoint hinzufügen

- ui.js: [Krea: datei] URLs von /api/skills/krea-api/output/ auf /api/images/file/ geändert
- KreaEndpoint: GET /api/images/file/{filename}/thumb mit gecachten WebP-Thumbnails (320px)
- Thumbnail-Cache in data/cache/images/, analog zum SkillEndpoint
This commit is contained in:
Meleki committed 2026-03-06 15:10:26 +01:00
1 parent 20f96f69d0
commit 1f5f49228b
2 files changed
+81 -2

No files matched your search

+2 -2
View File
@@ -170,8 +170,8 @@ function renderMarkdown(text) {
html = html.replace(/\[Krea:\s*([^\]]+)\]/g, function(match, filename) {
var fn = filename.trim();
var safeFn = esc(fn);
var thumbUrl = '/api/skills/krea-api/output/' + encodeURIComponent(fn) + '/thumb';
var fullUrl = '/api/skills/krea-api/output/' + encodeURIComponent(fn);
var thumbUrl = '/api/images/file/' + encodeURIComponent(fn) + '/thumb';
var fullUrl = '/api/images/file/' + encodeURIComponent(fn);
return '<span class="krea-ref" data-filename="' + safeFn + '" data-fullurl="' + fullUrl + '" title="Klicken für Vollbild">'
+ '<img class="krea-thumb" src="' + thumbUrl + '" alt="' + safeFn + '" loading="lazy">'
+ '</span>';