def manipulate_resource_list(resources)
      return resources unless options.use_specs
      resources + @resize_specs.reduce([]) do |res, resize_spec|
        Dir.chdir(File.absolute_path(File.join(app.root, app.config[:source], app.config[:images_dir]))) do
          Dir.glob(resize_spec.path) do |image_file|
            store_resized_image(image_file, resize_spec.resize_to)
            img = MiddlemanSimpleThumbnailer::Image.new(image_file, resize_spec.resize_to, app, options).tap do |i|
              i.prepare_thumbnail
            end
            resized_image_path = File.join(app.config[:images_dir],img.resized_img_path)
            new_resource = MiddlemanSimpleThumbnailer::Resource.new(
              app.sitemap,
              resized_image_path,
              img.cached_resized_img_abs_path,
            )
            res.push(new_resource)
          end
        end
        res
      end
    end
def manipulate_resource_list(resources)
      return resources unless options.use_specs
      resources + @resize_specs.reduce([]) do |res, resize_spec|
        Dir.chdir(File.absolute_path(File.join(app.root, app.config[:source], app.config[:images_dir]))) do
          Dir.glob(resize_spec.path) do |image_file|
            store_resized_image(image_file, resize_spec.resize_to)
            img = MiddlemanSimpleThumbnailer::Image.new(image_file, resize_spec.resize_to, app, options).tap do |i|
              i.prepare_thumbnail
            end
            resized_image_path = File.join(app.config[:images_dir],img.resized_img_path)
            new_resource = MiddlemanSimpleThumbnailer::Resource.new(
              app.sitemap,
              resized_image_path,
              img.cached_resized_img_abs_path,
            )
            res.push(new_resource)
          end
        end
        res
      end
    end
def source_dir
   File.absolute_path(app.config[:source], app.root)
 end