Sha256: 118f18e90a3831a2e7a5a5c58536c20bf6e0105c5e4b863a386da41d4761f170
Contents?: true
Size: 716 Bytes
Versions: 96
Compression:
Stored size: 716 Bytes
Contents
# frozen_string_literal: true module Alchemy class Picture < BaseRecord class Preprocessor def initialize(image_file) @image_file = image_file end # Preprocess images after upload # # Define preprocessing options in the Alchemy::Config # # preprocess_image_resize [String] - Downsizing example: '1000x1000>' # def call max_image_size = Alchemy::Config.get(:preprocess_image_resize) image_file.thumb!(max_image_size) if max_image_size.present? # Auto orient the image so EXIF orientation data is taken into account image_file.auto_orient! end private attr_reader :image_file end end end
Version data entries
96 entries across 96 versions & 1 rubygems