nuxt-prawo-jazdy/providers/selfhost.ts
NetMan c99576617b many minor fixes:
nuxtimg, categories composabled, tailwind config in js, remove comments, next question operation, media fit
2025-04-28 13:11:07 +02:00

18 lines
452 B
TypeScript

import { joinURL } from 'ufo';
import type { ProviderGetImage } from '@nuxt/image';
import { createOperationsGenerator } from '#image';
const operationsGenerator = createOperationsGenerator();
export const getImage: ProviderGetImage = (
src,
{ modifiers = {}, baseUrl } = {},
) => {
baseUrl ??= '';
const operations = operationsGenerator(modifiers);
return {
url: joinURL(baseUrl, src + (operations ? '?' + operations : '')),
};
};