Ajouter une route JPEG ou Cover Cache

This commit is contained in:
2025-11-28 21:22:39 +01:00
parent b04a90818f
commit 4e979a2d79
7 changed files with 118 additions and 48 deletions

View File

@@ -193,6 +193,13 @@ export function getImageUrl(pk: string, size?: number): string {
return `/covers/image/${pk}`;
}
export function getJpegUrl(pk: string, size?: number): string {
if (size) {
return `/covers/jpeg/${pk}/${size}`;
}
return `/covers/jpeg/${pk}`;
}
/**
* SVG par défaut pour les images qui ne se chargent pas
*/