Skip to content

Commit

Permalink
feat: Use video thumbnail for GIF types (#13677)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranay-Pandey authored Oct 22, 2024
1 parent e98acc9 commit d40cbe4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/src/services/media.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ export class MediaService extends BaseService {
}

let generated: { previewPath: string; thumbnailPath: string; thumbhash: Buffer };
if (asset.type === AssetType.IMAGE) {
generated = await this.generateImageThumbnails(asset);
} else if (asset.type === AssetType.VIDEO) {
if (asset.type === AssetType.VIDEO || asset.originalFileName.toLowerCase().endsWith('.gif')) {
generated = await this.generateVideoThumbnails(asset);
} else if (asset.type === AssetType.IMAGE) {
generated = await this.generateImageThumbnails(asset);
} else {
this.logger.warn(`Skipping thumbnail generation for asset ${id}: ${asset.type} is not an image or video`);
return JobStatus.SKIPPED;
Expand Down

0 comments on commit d40cbe4

Please sign in to comment.