mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-30 18:35:00 -04:00 
			
		
		
		
	Use Webp for album thumbnail
This commit is contained in:
		
							parent
							
								
									1ea6425cd1
								
							
						
					
					
						commit
						9c3f848fa8
					
				| @ -13,7 +13,9 @@ | ||||
| 			return '/no-thumbnail.png'; | ||||
| 		} | ||||
| 
 | ||||
| 		const { data } = await api.assetApi.getAssetThumbnail(thubmnailId!, ThumbnailFormat.Jpeg, { responseType: 'blob' }); | ||||
| 		const { data } = await api.assetApi.getAssetThumbnail(thubmnailId!, ThumbnailFormat.Webp, { | ||||
| 			responseType: 'blob' | ||||
| 		}); | ||||
| 		if (data instanceof Blob) { | ||||
| 			imageData = URL.createObjectURL(data); | ||||
| 			return imageData; | ||||
| @ -21,10 +23,15 @@ | ||||
| 	}; | ||||
| </script> | ||||
| 
 | ||||
| <div class="h-[339px] w-[275px] hover:cursor-pointer mt-4" on:click={() => dispatch('click', album)}> | ||||
| <div | ||||
| 	class="h-[339px] w-[275px] hover:cursor-pointer mt-4" | ||||
| 	on:click={() => dispatch('click', album)} | ||||
| > | ||||
| 	<div class={`h-[275px] w-[275px]`}> | ||||
| 		{#await loadImageData(album.albumThumbnailAssetId)} | ||||
| 			<div class={`bg-immich-primary/10 w-full h-full  flex place-items-center place-content-center rounded-xl`}> | ||||
| 			<div | ||||
| 				class={`bg-immich-primary/10 w-full h-full  flex place-items-center place-content-center rounded-xl`} | ||||
| 			> | ||||
| 				... | ||||
| 			</div> | ||||
| 		{:then imageData} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user