From 1408733386219e1588c14d2fbf9f3c926513a5a3 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 7 Jun 2024 11:27:59 +0200 Subject: [PATCH] Fix Mastodon relying on ImageMagick even with `MASTODON_USE_LIBVIPS` (#30590) --- app/models/custom_emoji.rb | 2 +- spec/models/custom_emoji_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/custom_emoji.rb b/app/models/custom_emoji.rb index 1c9b443959..31ba91ad02 100644 --- a/app/models/custom_emoji.rb +++ b/app/models/custom_emoji.rb @@ -39,7 +39,7 @@ class CustomEmoji < ApplicationRecord has_one :local_counterpart, -> { where(domain: nil) }, class_name: 'CustomEmoji', primary_key: :shortcode, foreign_key: :shortcode, inverse_of: false, dependent: nil - has_attached_file :image, styles: { static: { format: 'png', convert_options: '-coalesce +profile "!icc,*" +set date:modify +set date:create +set date:timestamp' } }, validate_media_type: false + has_attached_file :image, styles: { static: { format: 'png', convert_options: '-coalesce +profile "!icc,*" +set date:modify +set date:create +set date:timestamp', file_geometry_parser: FastGeometryParser } }, validate_media_type: false, processors: [:lazy_thumbnail] normalizes :domain, with: ->(domain) { domain.downcase } diff --git a/spec/models/custom_emoji_spec.rb b/spec/models/custom_emoji_spec.rb index a0903e5978..038d1d0c6c 100644 --- a/spec/models/custom_emoji_spec.rb +++ b/spec/models/custom_emoji_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe CustomEmoji do +RSpec.describe CustomEmoji, :paperclip_processing do describe '#search' do subject { described_class.search(search_term) }