]> cat aescling's git repositories - mastodon.git/commitdiff
Remove timestamps from converted images to make them deterministic (#11408)
authorEugen Rochko <eugen@zeonfederated.com>
Sat, 27 Jul 2019 02:41:55 +0000 (04:41 +0200)
committerGitHub <noreply@github.com>
Sat, 27 Jul 2019 02:41:55 +0000 (04:41 +0200)
app/models/media_attachment.rb

index 05be302aff9b606cdee4932ff909c9e5e925eef6..2fc5ccf2717c30479b35a7307324b781eab73bf4 100644 (file)
@@ -113,7 +113,7 @@ class MediaAttachment < ApplicationRecord
   has_attached_file :file,
                     styles: ->(f) { file_styles f },
                     processors: ->(f) { file_processors f },
-                    convert_options: { all: '-quality 90 -strip' }
+                    convert_options: { all: '-quality 90 -strip +set modify-date +set create-date' }
 
   validates_attachment_content_type :file, content_type: IMAGE_MIME_TYPES + VIDEO_MIME_TYPES + AUDIO_MIME_TYPES
   validates_attachment_size :file, less_than: IMAGE_LIMIT, unless: :larger_media_format?