lib/tasks/alchemy/thumbnails.rake in alchemy_cms-6.0.6 vs lib/tasks/alchemy/thumbnails.rake in alchemy_cms-6.0.7

- old
+ new

@@ -4,10 +4,11 @@ namespace :generate do desc "Generates all thumbnails for Alchemy Pictures and EssencePictures." task thumbnails: [ "alchemy:generate:picture_thumbnails", "alchemy:generate:essence_picture_thumbnails", + "alchemy:generate:ingredient_picture_thumbnails", ] desc "Generates thumbnails for Alchemy Pictures." task picture_thumbnails: :environment do puts "Regenerate #{Alchemy::Picture.count} picture thumbnails." @@ -29,10 +30,14 @@ puts "Please wait..." essence_pictures.find_each do |essence_picture| puts essence_picture.picture_url puts essence_picture.thumbnail_url + + essence_picture.settings.fetch(:srcset, []).each do |src| + puts essence_picture.picture_url(src) + end end puts "Done!" end @@ -53,9 +58,13 @@ puts "Please wait..." ingredient_pictures.find_each do |ingredient_picture| puts ingredient_picture.picture_url puts ingredient_picture.thumbnail_url + + ingredient_picture.settings.fetch(:srcset, []).each do |src| + puts ingredient_picture.picture_url(src) + end end puts "Done!" end end