From b717d6f5806c83d9f9a634428fd5aee978ceec4f Mon Sep 17 00:00:00 2001 From: Ember <me@ember-is.gay> Date: Sat, 13 Jan 2024 06:39:49 +0000 Subject: [PATCH] Update app/models/media_attachment.rb --- app/models/media_attachment.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index 2ab7277d18c8a1..e67dc1d8e9719a 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -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 @@ -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