fix: watermark thumbnails, custom logo display, and German translations
- Fix thumbnail display when watermarks enabled globally on existing galleries - Backend: Apply watermarks to thumbnails at the thumbnail endpoint - Frontend: Remove hack that redirected thumbnails to photo endpoint - Fix custom logo display in gallery hero sections - Only apply brightness/invert filter to default PicPeak logo - Custom logos now display as-is with drop-shadow only - Add German translations for Event Creation and Image Protection settings - settings.events: Pflichtfelder, Kundenname/E-Mail erforderlich, etc. - settings.imageSecurity: Bildschutz, Ratenbegrenzung, Sicherheitsüberwachung - Protection level options in both EN and DE locales
This commit is contained in:
@@ -829,8 +829,17 @@ router.get('/:slug/thumbnail/:photoId',
|
||||
'X-Protected-Thumbnail': 'true'
|
||||
});
|
||||
|
||||
// Send file
|
||||
res.sendFile(path.resolve(thumbPath));
|
||||
// Check if watermarks are enabled and apply to thumbnail
|
||||
const watermarkSettings = await watermarkService.getWatermarkSettings();
|
||||
|
||||
if (watermarkSettings && watermarkSettings.enabled) {
|
||||
// Apply watermark to thumbnail
|
||||
const watermarkedBuffer = await watermarkService.applyWatermark(thumbPath, watermarkSettings);
|
||||
res.send(watermarkedBuffer);
|
||||
} else {
|
||||
// Send file without watermark
|
||||
res.sendFile(path.resolve(thumbPath));
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error('Error serving thumbnail:', {
|
||||
error: error.message,
|
||||
|
||||
Reference in New Issue
Block a user