Albums: Downsize share preview image from 1600x900 to 1200x675 #3658

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2023-09-09 10:40:14 +02:00
parent dbcaf775a8
commit 12608a7a31

View file

@ -141,8 +141,11 @@ func SharePreview(router *gin.RouterGroup) {
// Create album preview from thumbnail images.
preview, err := frame.Collage(frame.Polaroid, images)
// Downsize from 1600x900 to 1200x675.
preview = imaging.Resize(preview, 1200, 0, imaging.Lanczos)
// Save the resulting album preview as JPEG.
err = imaging.Save(preview, previewFilename)
err = imaging.Save(preview, previewFilename, thumb.JpegQualitySmall.EncodeOption())
if err != nil {
log.Error(err)