Skip to content

Commit

Permalink
Optimize attr setting order
Browse files Browse the repository at this point in the history
  • Loading branch information
zerodevx committed Jun 29, 2023
1 parent fc69ff6 commit cd2e75d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/SvelteImg.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ $: if (src.length) {
{/each}
<!-- svelte-ignore a11y-missing-attribute -->
<img
src={image.src}
srcset={image.srcset}
{loading}
{decoding}
{sizes}
width={width || image.width || undefined}
height={height || image.height || undefined}
{loading}
{decoding}
style:background={image.lqip}
bind:this={ref}
on:click
on:load
{...$$restProps}
srcset={image.srcset}
src={image.src}
/>
</picture>
{/if}

0 comments on commit cd2e75d

Please sign in to comment.