Advertisement


how do you change jpeg export quality in Sketch?


Question

e.g. if i want to export a jpeg at 80%, how do i do that in Sketch.app? it appears to export at 96% by default.

2016/05/26
1
6
5/26/2016 9:49:00 PM

edit:

there is a much more simple way of doing this. when you hit export and the file prompt shows up, click options, and you are presented with options including quality

enter image description here


after some investigation, i discovered you are able to do this via os x's command line defaults tool:

to lower the quality:

$ defaults write com.bohemiancoding.sketch3 JPGQuality -string "0.6"

you can reset it to the default of 0.9:

$ defaults write com.bohemiancoding.sketch3 JPGQuality -string "0.9"

i also learned that a variety of things can affect JPEG quality, so the percentage i set in sketch doesn't line up exactly with the quality reported by imagemagick's identify tool.

you can see Sketch's configurations by running this command:

$ defaults read com.bohemiancoding.sketch3
2016/05/27
6
5/27/2016 12:00:00 AM