PERF: run ImageMagick conversions with nice 10

PERF: run ImageMagick conversions with nice 10

This lowers the priority of all image resizes so they do not clog CPU on machines running low on resources

diff --git a/app/models/optimized_image.rb b/app/models/optimized_image.rb
index 2b5f986..5e67cb8 100644
--- a/app/models/optimized_image.rb
+++ b/app/models/optimized_image.rb
@@ -330,7 +330,7 @@ class OptimizedImage < ActiveRecord::Base
   MAX_PNGQUANT_SIZE = 500_000
 
   def self.convert_with(instructions, to, opts = {})
-    Discourse::Utils.execute_command(*instructions)
+    Discourse::Utils.execute_command("nice", "-n", "10", *instructions)
 
     allow_pngquant = to.downcase.ends_with?(".png") && File.size(to) < MAX_PNGQUANT_SIZE
     FileHelper.optimize_image!(to, allow_pngquant: allow_pngquant)

GitHub sha: 7e4a43af