mirror of
https://github.com/danbee/my-images
synced 2025-03-04 08:49:05 +00:00
16 lines
287 B
Ruby
16 lines
287 B
Ruby
module ImageHelper
|
|
def image_variant(image, variant)
|
|
image.variant(variant)
|
|
end
|
|
|
|
def image_thumb(image, size)
|
|
image.variant(
|
|
combine_options: {
|
|
gravity: "center",
|
|
resize: "#{size}x#{size}^",
|
|
extent: "#{size}x#{size}",
|
|
},
|
|
)
|
|
end
|
|
end
|