mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
24 lines
448 B
TypeScript
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 };
|