10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'app/helpers/refinery/admin/images_helper.rb', line 10
def thumbnail_urls(image)
thumbnail_urls = {
:"data-original" => asset_paths.compute_public_path(image.url, ''),
:"data-grid" => asset_paths.compute_public_path(image.thumbnail('135x135#c').url, '')
}
Refinery::Images.user_image_sizes.sort_by{|key,geometry| geometry}.each do |size, pixels|
thumbnail_urls[:"data-#{size.to_s.parameterize}"] = asset_paths.compute_public_path(image.thumbnail(pixels).url, '')
end
thumbnail_urls
end
|