Carrierwave: convert an uploaded PNG to JPG by replacing the original version
问题 I have the following model: class ScreenshotUploader < CarrierWave::Uploader::Base include CarrierWave::MiniMagick storage :file convert :jpg version :thumb do process resize_to_fill: [50, 50] end def extension_whitelist %w(jpg jpeg gif png) end version :print do process border: ['black'] process quality: 80 end end The upload of the image happens via pasting an image from the clipboard via https://github.com/layerssss/paste.js and is saved as a base64 encoded string into a <textarea> , then