optimize screenshots and thumbnails, slight thumbnail quality reduction

This commit is contained in:
Kyle Drake 2016-12-29 17:09:01 -06:00
parent 841779a36c
commit e821410d84
5 changed files with 31 additions and 3 deletions

View file

@ -26,9 +26,12 @@ class ThumbnailWorker
save_ext = format.match(Site::LOSSY_IMAGE_REGEX) ? 'jpg' : 'png'
resimg.write(File.join(user_thumbnails_path, "#{path}.#{res}.#{save_ext}")) {
self.quality = 90
full_thumbnail_path = File.join(user_thumbnails_path, "#{path}.#{res}.#{save_ext}")
resimg.write(full_thumbnail_path) {
self.quality = 75
}
$image_optim.optimize_image! full_thumbnail_path
end
end
end