Skip to content

Instantly share code, notes, and snippets.


Robert Smith rsmithlal

View GitHub Profile
rsmithlal / watermark.rb
Last active Jan 15, 2020 — forked from ardianys/watermark.rb
Working Paperclip 4.2.0 watermark processor for Rails 4.x.x and Ruby 2.x.x
View watermark.rb
# Rails.root /app/models/user.rb
class User
has_attached_file :photo,
styles: {
medium: {
processors: [:watermark],
geometry: "300x300>",
watermark_path: "#{Rails.root}/public/images/watermark.png"
convert_options: { "-strip -auto-orient -colorspace sRGB" } #or whatever options you want