Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 1.17 KB

images.md

File metadata and controls

53 lines (38 loc) · 1.17 KB

Images Integration

Paperclip

Image Row

show do
  attributes_table do
    image_row :photo
  end
end

Image Column

index do
  image_column :photo, style: :thumb
end

You can pass style attribute matching paperclip's style definition

Shrine

Image Row

The Shrine implementation receives an optional image_options which is then used as the options for the image_tag method.

show do
  attributes_table do
    image_row :photo, image_options: { width: 400 }
  end
end

Image Column

To use the Shrine derivatives you can use the style option with the name of the derivative like the example below. In this case you would need to have a derivative created with the 'jpg_small' name.

index do
  image_column :photo, style: :jpg_small
end