K
K
Konstantin T2018-07-27 09:56:29
Ruby on Rails
Konstantin T, 2018-07-27 09:56:29

CarierWave - if you set the global process, will the version get the processed file or will it be created from the original?

There are several applouders, all of them are inherited from one base:

class AlbumPhotoUploader < ImageUploader
  # .... code
  version (:small) {process resize_to_fill: [200, 130]}
end

class PhotoUploader < ImageUploader
  # .... code
  version (:small) {process resize_to_fill: [200, 130]} 
end

class ImageUploader < CarrierWave::Uploader::Base 
  include CarrierWave::MiniMagick
  # .... code

  process :quality => 75
end

The question is that, with an applause, I reduce the quality of the picture, will the small versions be made from the worst quality or from the original, and do I need to prescribe a decrease in quality in each version?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artur Bordenyuk, 2018-07-27
@RooTooZ

The version will include pictures with quality 75.
First, the processes, then the versions are worked out.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question