Guide

Read the guide to get started
Switch chapter

Image collection

A collection of images is automatically sorted and can be rendered by using the images helper and passing a block.

Theme configuration

config.parts = [
  # ...
  {
    name: "cars",
    title: "Images of cars",
    part_type: "Spina::Parts::ImageCollection"
  }
]

View template example

<% images(:cars) do |image| %>

  <%= content.image_tag image, resize: '50x50' %>

<% end %>