feat(frontend): specify height as well as width for avatars

This commit is contained in:
Sam 2023-03-27 15:40:23 +02:00
parent 99ab8b6864
commit 4a17611766
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
3 changed files with 22 additions and 4 deletions

View file

@ -25,8 +25,14 @@
{#each urls as url}
<source {width} srcSet={url} type={contentTypeFor(url)} />
{/each}
<img {width} src={urls[0] || defaultAvatars[0]} {alt} class="rounded-circle img-fluid" />
<img
{width}
height={width}
src={urls[0] || defaultAvatars[0]}
{alt}
class="rounded-circle img-fluid"
/>
</picture>
{:else}
<img {width} class="rounded-circle img-fluid" src={defaultAvatars[0]} {alt} />
<img {width} height={width} class="rounded-circle img-fluid" src={defaultAvatars[0]} {alt} />
{/if}