<% @posts.each do |post| %>
  <%= link_to(image_tag(post.preview_url, :width => post.preview_dimensions[0], :height => post.preview_dimensions[1], :style => "margin: 2em;", :title => post.cached_tags), :controller => "post", :action => "show", :id => post.id) %>
<% end %>
