about summary refs log tree commit diff
path: root/app/models/preview_card.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2023-03-25 10:00:03 +0100
committerGitHub <noreply@github.com>2023-03-25 10:00:03 +0100
commit9bda93374093c738f1007922b2e8df58043c718f (patch)
tree8646507dbbf1cbc515912a047363c56e1bf16cd2 /app/models/preview_card.rb
parentef127c964a60f365129bc97a2cb2fc6d12ba6407 (diff)
Change media upload limits and remove client-side resizing (#23726)
Diffstat (limited to 'app/models/preview_card.rb')
-rw-r--r--app/models/preview_card.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/preview_card.rb b/app/models/preview_card.rb
index 6bce16562..a738940be 100644
--- a/app/models/preview_card.rb
+++ b/app/models/preview_card.rb
@@ -36,7 +36,7 @@ class PreviewCard < ApplicationRecord
   include Attachmentable
 
   IMAGE_MIME_TYPES = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'].freeze
-  LIMIT = 1.megabytes
+  LIMIT = 2.megabytes
 
   BLURHASH_OPTIONS = {
     x_comp: 4,
@@ -121,7 +121,7 @@ class PreviewCard < ApplicationRecord
     def image_styles(file)
       styles = {
         original: {
-          geometry: '400x400>',
+          pixels: 230_400, # 640x360px
           file_geometry_parser: FastGeometryParser,
           convert_options: '-coalesce',
           blurhash: BLURHASH_OPTIONS,