Skip to content

Commit

Permalink
Setting quality 70 for AVIF images
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Sep 14, 2020
1 parent 5f36cb2 commit 27e080b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion img/processor/imagemagick.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,12 @@ func getConvertFormatOptions(inf *ImageInfo) []string {
}

func getQualityOptions(inf *ImageInfo, outputMimeType string) []string {
if outputMimeType == "image/avif" {
return []string{"-quality", "70"}
}

//Changing quality if it wasn't set in the original image
if inf.quality == 100 && outputMimeType != "image/avif" {
if inf.quality == 100 {
return []string{"-quality", "82"}
}

Expand Down

0 comments on commit 27e080b

Please sign in to comment.