blob: 9f20e6cdea10c64907a7822a8113449aaae8cd89 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
export interface XeblogPicture {
path: string;
desc?: string;
}
export default function XeblogPicture({ path, desc }: XeblogPicture) {
return (
<figure>
<picture>
<source
type="image/avif"
srcset={`https://cdn.xeiaso.net/file/christine-static/${path}.avif`}
/>
<source
type="image/webp"
srcset={`https://cdn.xeiaso.net/file/christine-static/${path}.webp`}
/>
<img
alt={`An image of ${prompt}`}
loading="lazy"
src={`https://cdn.xeiaso.net/file/christine-static/${path}.jpg`}
/>
</picture>
{desc && <figcaption>{desc}</figcaption>}
</figure>
);
}
|