Change media upload limits and remove client-side resizing (#23726)
This commit is contained in:
parent
ef127c964a
commit
9bda933740
9 changed files with 38 additions and 246 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue