Derivatives don't generate any file

Hi :

I have a few problem with derivatives.

The logic of my file is straightforward :

require "image_processing/mini_magick"

class ImageUploader < Shrine
    # plugins and uploading logic
    plugin :pretty_location
    plugin :derivatives
    plugin :store_dimensions
    plugin :remove_attachment
    plugin :validation_helpers
    plugin :remove_invalid
    plugin :determine_mime_type, analyzer: :marcel

    Attacher.derivatives_processor do |original|
        magick = ImageProcessing::MiniMagick.source(original)
     
        { 
          large:  magick.resize_to_limit!(800, 800),
          medium: magick.resize_to_limit!(500, 500),
          small:  magick.resize_to_limit!(300, 300),
        }
    end

    Attacher.validate do
        validate_mime_type_inclusion %w[image/jpeg image/png image/gif]
        validate_max_size = 5*1024*1024
        validate_extension_inclusion %w[jpg jpeg png gif]
    end

    def generate_location(io, record: nil, derivative: nil, **)
        return super unless record
     
        table  = record.class.table_name
        id     = record.id
        prefix = derivative || "original"
     
        "uploads/#{table}/#{id}/#{prefix}-#{super}"
    end
end

But I don’t know why, it doesn’t generate the corresponding versions.

gem ‘shrine’, ‘~> 3.2’, ‘>= 3.2.1’

gem ‘fastimage’, ‘~> 2.1’, ‘>= 2.1.7’

gem “image_processing”, “~> 1.8”

gem ‘marcel’, ‘~> 0.3.3’

I updated shrine.rb with that code :

class Shrine::Attacher
def promote(*)
create_derivatives
super
end
end

It seems to work !