Skip to content

Commit cb621cd

Browse files
committed
fix: update thumbnail output format to use configured format
1 parent bcc3d48 commit cb621cd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

storage/storage.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ func SaveAll(ctx context.Context, artwork *types.Artwork, picture *types.Picture
110110
common.Logger.Fatalf("Unknown storage type: %s", config.Cfg.Storage.ThumbType)
111111
return nil, fmt.Errorf("%w: %s", errs.ErrStorageUnkown, config.Cfg.Storage.ThumbType)
112112
}
113-
// thumbOutputPath := filePath[:len(filePath)-len(filepath.Ext(filePath))] + "_thumb.webp"
114-
thumbOutputPath := fmt.Sprintf("%s_thumb.webp", filePath[:len(filePath)-len(filepath.Ext(filePath))])
113+
thumbOutputPath := fmt.Sprintf("%s_thumb.%s", filePath[:len(filePath)-len(filepath.Ext(filePath))], config.Cfg.Storage.ThumbFormat)
115114
if err := common.CompressImageByFFmpeg(filePath, thumbOutputPath, types.ThumbPhotoSideLength); err != nil {
116115
return nil, err
117116
}

0 commit comments

Comments
 (0)