Skip to content

Commit

Permalink
Merge remote-tracking branch 'Sorunome/soru/thumbnail-jpeg'
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Nov 17, 2020
2 parents 4d40676 + 6f90d5c commit 5292959
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thumbnailing/i/jpg.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ func (d jpgGenerator) GenerateThumbnail(b []byte, contentType string, width int,
}

imgData := &bytes.Buffer{}
err = imaging.Encode(imgData, thumb, imaging.PNG)
err = imaging.Encode(imgData, thumb, imaging.JPEG)
if err != nil {
return nil, errors.New("jpg: error encoding thumbnail: " + err.Error())
}
return &m.Thumbnail{
Animated: false,
ContentType: "image/png",
ContentType: "image/jpeg",
Reader: ioutil.NopCloser(imgData),
}, nil
}
Expand Down

0 comments on commit 5292959

Please sign in to comment.