feat(thumb): enhance native thumbnail generater with encoding format and quality (#2868)

* feat(thumb): enhance native thumbnail generater with encoding format and quality

* Update thumbnail.go

* Update obs.go
This commit is contained in:
Darren Yu
2025-09-05 11:40:30 +08:00
committed by GitHub
parent cec2b55e1e
commit fe7cf5d0d8
7 changed files with 91 additions and 6 deletions

View File

@@ -185,9 +185,8 @@ func (m *manager) generateThumb(ctx context.Context, uri *fs.URI, ext string, es
Uri: uri,
Size: fileInfo.Size(),
SavePath: fmt.Sprintf(
"%s.%s%s",
"%s%s",
es.Entity().Source(),
util.RandStringRunes(16),
m.settings.ThumbEntitySuffix(ctx),
),
MimeType: m.dep.MimeDetector(ctx).TypeByName("thumb.jpg"),