From 9bc0a6c861e07d0112ef2e5ccd28adeca868bdbe Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 11 Nov 2022 09:20:10 +0100 Subject: Fix metadata scrubbing removing color profile from images (#20389) --- app/models/site_upload.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/site_upload.rb') diff --git a/app/models/site_upload.rb b/app/models/site_upload.rb index d3b81d4d5..167131fdd 100644 --- a/app/models/site_upload.rb +++ b/app/models/site_upload.rb @@ -40,7 +40,7 @@ class SiteUpload < ApplicationRecord mascot: {}.freeze, }.freeze - has_attached_file :file, styles: ->(file) { STYLES[file.instance.var.to_sym] }, convert_options: { all: '-coalesce -strip' }, processors: [:lazy_thumbnail, :blurhash_transcoder, :type_corrector] + has_attached_file :file, styles: ->(file) { STYLES[file.instance.var.to_sym] }, convert_options: { all: '-coalesce +profile "!icc,*" +set modify-date +set create-date' }, processors: [:lazy_thumbnail, :blurhash_transcoder, :type_corrector] validates_attachment_content_type :file, content_type: /\Aimage\/.*\z/ validates :file, presence: true -- cgit