perf: Optimizing the image loading

Does no longer load all klipy images through image proxy from signal server. Improves loading performance.
This commit is contained in:
2026-03-30 00:10:40 +02:00
parent 11917f3412
commit eb23fd71ec
9 changed files with 65 additions and 19 deletions

View File

@@ -21,6 +21,7 @@ import {
lucideX
} from '@ng-icons/lucide';
import { KlipyGif, KlipyService } from '../../application/klipy.service';
import { ChatImageProxyFallbackDirective } from '../chat-image-proxy-fallback.directive';
@Component({
selector: 'app-klipy-gif-picker',
@@ -28,7 +29,8 @@ import { KlipyGif, KlipyService } from '../../application/klipy.service';
imports: [
CommonModule,
FormsModule,
NgIcon
NgIcon,
ChatImageProxyFallbackDirective
],
viewProviders: [
provideIcons({
@@ -112,10 +114,6 @@ export class KlipyGifPickerComponent implements OnInit, AfterViewInit, OnDestroy
return '1 / 1';
}
gifPreviewUrl(gif: KlipyGif): string {
return this.klipy.buildRenderableImageUrl(gif.previewUrl || gif.url);
}
private async loadResults(reset: boolean): Promise<void> {
if (reset) {
this.currentPage = 1;