Sha256: cf3b25820ecc18df83ffc86c3556a32ce1d2237f71b5a972cd7fbcb05b70ecdc
Contents?: true
Size: 473 Bytes
Versions: 1
Compression:
Stored size: 473 Bytes
Contents
namespace :picture do desc "Picture task converting uploaded images to webp and jp2 formats" task :prepare, [:path] do |task, args| p "This may take some time..." path = args[:path] || 'public' ["png", "jpg", "jpeg", "gif"].each do |dim| Dir[ path + "/**/*.{#{dim}}" ].each do |file| p "#{file} converting" begin PictureConverter.convert(file) rescue => e p e end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
carrierwave-picture-0.3.3 | lib/tasks/picture.rake |