diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-11-11 09:20:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 09:20:10 +0100 |
commit | 9bc0a6c861e07d0112ef2e5ccd28adeca868bdbe (patch) | |
tree | 00001c6554ebd15d01df92cf805b9eda58703452 /app/models/preview_card.rb | |
parent | 53028af10ee5244d050e84580c396df25c2e8fc3 (diff) |
Fix metadata scrubbing removing color profile from images (#20389)
Diffstat (limited to 'app/models/preview_card.rb')
-rw-r--r-- | app/models/preview_card.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/preview_card.rb b/app/models/preview_card.rb index b5d3f9c8f..56ca62d5e 100644 --- a/app/models/preview_card.rb +++ b/app/models/preview_card.rb @@ -50,7 +50,7 @@ class PreviewCard < ApplicationRecord has_and_belongs_to_many :statuses has_one :trend, class_name: 'PreviewCardTrend', inverse_of: :preview_card, dependent: :destroy - has_attached_file :image, processors: [:thumbnail, :blurhash_transcoder], styles: ->(f) { image_styles(f) }, convert_options: { all: '-quality 80 -strip' }, validate_media_type: false + has_attached_file :image, processors: [:thumbnail, :blurhash_transcoder], styles: ->(f) { image_styles(f) }, convert_options: { all: '-quality 90 +profile "!icc,*" +set modify-date +set create-date' }, validate_media_type: false validates :url, presence: true, uniqueness: true validates_attachment_content_type :image, content_type: IMAGE_MIME_TYPES @@ -122,7 +122,7 @@ class PreviewCard < ApplicationRecord original: { geometry: '400x400>', file_geometry_parser: FastGeometryParser, - convert_options: '-coalesce -strip', + convert_options: '-coalesce', blurhash: BLURHASH_OPTIONS, }, } |