mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-21 16:25:36 +02:00
working on the frontend, adding torrent page, working on show directory, working on the api
This commit is contained in:
12
web/src/hooks.server.ts
Normal file
12
web/src/hooks.server.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import {createImageOptimizer} from 'sveltekit-image-optimize';
|
||||
import type {Handle} from '@sveltejs/kit';
|
||||
import {createFileSystemCache} from 'sveltekit-image-optimize/cache-adapters';
|
||||
|
||||
const cache = createFileSystemCache('./cache');
|
||||
const imageHandler = createImageOptimizer({
|
||||
cache: cache,
|
||||
fallbackFormat: 'avif',
|
||||
quality: 20
|
||||
});
|
||||
|
||||
export const handle: Handle = imageHandler;
|
||||
Reference in New Issue
Block a user