diff --git a/app/models/alchemy/picture_variant.rb b/app/models/alchemy/picture_variant.rb
index <HASH>..<HASH> 100644
--- a/app/models/alchemy/picture_variant.rb
+++ b/app/models/alchemy/picture_variant.rb
@@ -93,7 +93,7 @@ module Alchemy
 
       convert_format = render_format.sub("jpeg", "jpg") != picture.image_file_format.sub("jpeg", "jpg")
 
-      if render_format =~ /jpe?g/ && convert_format
+      if render_format =~ /jpe?g/ && (convert_format || options[:quality])
         quality = options[:quality] || Config.get(:output_image_jpg_quality)
         encoding_options << "-quality #{quality}"
       end
Fix jpeg quality option for jpeg files

The quality option was previously ignored if the image was a JPEG.
Now the quality configuration will be added if the file isn't a
JPEG or the quality option was set.