Fix metadata scrubbing removing color profile from images (#20389)

This commit is contained in:
Eugen Rochko
2022-11-11 09:20:10 +01:00
committed by GitHub
parent 53028af10e
commit 9bc0a6c861
7 changed files with 8 additions and 8 deletions

View File

@@ -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,
},
}