about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-07-27 04:41:55 +0200
committerGitHub <noreply@github.com>2019-07-27 04:41:55 +0200
commit501148ab912b3bd36dbf0f9f2e10bfde7787012d (patch)
treee87047e97d8f68f331634fb0545bbecb8d948da6 /app/models
parent92569ffde81a3fe768fd8773fdab5d1a927f3f88 (diff)
Remove timestamps from converted images to make them deterministic (#11408)
Diffstat (limited to 'app/models')
-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 05be302af..2fc5ccf27 100644
--- a/app/models/media_attachment.rb
+++ b/app/models/media_attachment.rb
@@ -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?