Use Img component for author avatars
1 minute read
Author avatars are stored in static/images/authors/ and the avatar field is defined in src/lib/authors.js, but PublicationAuthors.svelte doesn't render them yet. Use the common Img component so
avatars go through the same image pipeline as everything else (srcset,
LQIP).
Current State
Authorinterface insrc/app.d.tshas an optionalavatarfieldsrc/lib/authors.jshas avatar paths set (e.g./images/authors/ramil.avif)PublicationAuthors.svelteonly renders author names, no images
Tasks
- Update
PublicationAuthors.svelteto render avatar viaImgcomponent - Look up full author data from
authorsmap using the tag - Handle missing avatars gracefully (initials fallback or hide image)
- Migrate from
export letto$props()while at it (Svelte 5)
Read next