Watermark now on east. New method for medium-sized images
This commit is contained in:
parent
37bf1d8589
commit
c23cfbbba2
2 changed files with 17 additions and 8 deletions
|
|
@ -162,11 +162,20 @@ class Screenshot < ApplicationRecord
|
|||
#Digest::MD5.base64digest(Net::HTTP.get(URI(url)))
|
||||
end
|
||||
|
||||
# Returns the URL that links to a full-size screenshot image with a watermark
|
||||
def large_watermarked
|
||||
# Returns the image variant that links to a full-size screenshot image with a watermark
|
||||
def medium_image
|
||||
if self.image.attached?
|
||||
self.image.variant(
|
||||
gravity: 'SouthEast',
|
||||
resize_to_limit: [670, 600]
|
||||
).processed
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the image variant that links to a medium-size screenshot for the details page
|
||||
def large_image_watermarked
|
||||
if self.image.attached?
|
||||
self.image.variant(
|
||||
gravity: 'East',
|
||||
draw: 'image Over 0,0 0,0 "public/logo/watermark.png"'
|
||||
).processed
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue