Skip to content

Commit

Permalink
Update app/models/media_attachment.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
Ember-ruby committed Jan 13, 2024
1 parent 2221dbc commit b717d6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/models/media_attachment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class MediaAttachment < ApplicationRecord
).freeze

IMAGE_MIME_TYPES = %w(image/jpeg image/png image/gif image/heic image/heif image/webp image/avif image/jxl).freeze
IMAGE_CONVERTIBLE_MIME_TYPES = %w(image/heic image/heif image/avif image/jxl).freeze
IMAGE_CONVERTIBLE_MIME_TYPES = %w(image/heic image/heif image/jxl).freeze
VIDEO_MIME_TYPES = %w(video/webm video/mp4 video/quicktime video/ogg).freeze
VIDEO_CONVERTIBLE_MIME_TYPES = %w(video/quicktime).freeze
AUDIO_MIME_TYPES = %w(audio/wave audio/wav audio/x-wav audio/x-pn-wave audio/vnd.wave audio/ogg audio/vorbis audio/mpeg audio/mp3 audio/webm audio/flac audio/aac audio/m4a audio/x-m4a audio/mp4 audio/3gpp video/x-ms-asf audio/opus).freeze
Expand All @@ -83,12 +83,12 @@ class MediaAttachment < ApplicationRecord

IMAGE_CONVERTED_STYLES = {
original: {
format: 'webp',
content_type: 'image/webp',
format: 'avif',
content_type: 'image/avif',
}.merge(IMAGE_STYLES[:original]).freeze,

small: {
format: 'webp',
format: 'avif',
}.merge(IMAGE_STYLES[:small]).freeze,
}.freeze

Expand Down

0 comments on commit b717d6f

Please sign in to comment.