module Ires::ViewHelper

Public Instance Methods

ires_tag(path, width: nil, height: nil, type: Type::ALL, mode: Mode::RESIZE, expire: 30.days, **option) click to toggle source

Image resize @return [image_tag]

# File lib/ires/view_helper.rb, line 11
def ires_tag(path, width: nil, height: nil, type: Type::ALL, mode: Mode::RESIZE, expire: 30.days, **option)
  image_path = Ires::Service.path(
    path,
    width: width || 0,
    height: height || 0,
    mode: mode,
    type: type,
    expire: expire
  )

  # Set image_tag
  image_tag(image_path, option)
end