Files
morten-olsen.github.io/src/assets/images/icons.ts
Morten Olsen 98e39a54cc init
2024-04-02 12:00:29 +02:00

24 lines
448 B
TypeScript

import { getImage } from 'astro:assets';
import { data } from '@/data/data.js';
const imageSizes = [16, 32, 48, 64, 96, 128, 256, 512];
const pngs = await Promise.all(
imageSizes.map(async (size) => {
return {
...(await getImage({
src: data.profile.image,
format: 'png',
width: size,
height: size,
})),
size: `${size}x${size}`,
};
}),
);
const icons = {
pngs,
};
export { icons };