about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-07-27 04:41:55 +0200
committermultiple creatures <dev@multiple-creature.party>2020-02-21 03:47:33 -0600
commit371834b8409fb8b7775e1ffadf1f7d10019c4aa7 (patch)
treed099ab383a33cf65846a3fc5a12ed082d8cb1c33
parentfb8ed9ae30a9b7e76d4f42d1d4ce2d435e9c8ca2 (diff)
Remove timestamps from converted images to make them deterministic (#11408)
-rw-r--r--app/models/media_attachment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb
index 8726f1388..3498e26b4 100644
--- a/app/models/media_attachment.rb
+++ b/app/models/media_attachment.rb
@@ -129,7 +129,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?