Watermark images with paperclip, rails 4 - Stack Overflow
Paper mill watermarks
Update 2: In order to get the watermark displaying correctly, I had to change the model to: has_attached_file :image, :processors :watermark, :url :path :styles :large "640x480 :thumb "100x100 :medium :processors :watermark, :geometry '300x300 :watermark_path f :position 'SouthWest', dependent: :allow_destroy. To dig deep check out the official Github repo. The method validates the file type. I also had to remove the following from the model in order for the upload to process: :url :path i don't understand what the purpose of :url and :path are in this scenario, when users are uploading images? End # Performs the conversion of the file into a watermark. Rails generate paperclip photo image This will generate a new migration file that looks like this: class AddAttachmentImageToPhotos ActiveRecord:Migration def self. It is advisable to avoid PaperClip is your application will be complex. I've been attempting to add watermarks to my images, following the answer listed in watermark with paperclip : Watermark. #app/views/layouts b nav class"navbar navbar-default" div class"container-fluid"!- Brand and toggle get grouped for better mobile display - div class"navbar-header" button type"button" class"navbar-toggle collapsed" data-toggle"collapse" data-target navbar-collapse" aria-expanded"false" span class"sr-only" Toggle navigation /span span span span /button a class"navbar-brand" /div div class"collapse navbar-collapse" id"navbar-collapse" ul class"nav. Each do msg li msg /li end /ul /div end div class"form-group" bel :title text_field :title, class: 'form-control' /div div class"form-group" bel :image le_field :image, class: 'form-control' /div div class"form-group" bmit 'Upload Photo class: 'btn btn-default' /div end Time to configure your routes.
NameError (uninitialized constant Paperclip :Watermark :PaperclipCommandLineError lib/paperclip /watermark.rb:66:in rescue in make' lib/paperclip /watermark.
Rails fo "watermark initialized" end #.
Returns true if the target_geometry is meant to crop.