mirror of
https://github.com/immich-app/immich.git
synced 2025-07-03 21:40:00 +02:00
feat(web): Lazy load thumbnails on the people page (#5356)
* feat(web): Lazy load thumbnails on the people page Instead of loading all people thumbnails at once, only the first few should be loaded eagerly. This reduces the load on client and server side. * chore: change name --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
4d727708e2
commit
5781ae9d82
3 changed files with 8 additions and 2 deletions
web/src/lib/components/assets/thumbnail
|
@ -17,12 +17,14 @@
|
|||
export let circle = false;
|
||||
export let hidden = false;
|
||||
export let border = false;
|
||||
export let preload = true;
|
||||
let complete = false;
|
||||
|
||||
export let eyeColor: 'black' | 'white' = 'white';
|
||||
</script>
|
||||
|
||||
<img
|
||||
loading={preload ? 'eager' : 'lazy'}
|
||||
style:width={widthStyle}
|
||||
style:height={heightStyle}
|
||||
style:filter={hidden ? 'grayscale(50%)' : 'none'}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue