Skip to content

Commit

Permalink
Strip metadata from images
Browse files Browse the repository at this point in the history
  • Loading branch information
taitus committed May 22, 2023
1 parent 1fd4cca commit a695dfd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/models/custom/image.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require_dependency Rails.root.join("app", "models", "image").to_s

class Image < ApplicationRecord
def variant(style)
if style
attachment.variant(self.class.styles[style].merge(strip: true))
else
attachment.variant(strip: true)
end
end
end

0 comments on commit a695dfd

Please sign in to comment.