diff --git a/app/controllers/images_controller.rb b/app/controllers/images_controller.rb index c4b4185..86fe0ef 100644 --- a/app/controllers/images_controller.rb +++ b/app/controllers/images_controller.rb @@ -10,7 +10,9 @@ def show image.create_thumb_cache_file unless File.exist? image.thumb_path send_data File.binread(image.thumb_path) else - send_data image.open_image.read + # エラーメールが大量に飛ぶのを避ける為に、 + # 拡大画像が取得できない場合は空レスポンスを返す + send_data image.open_image.read rescue render nothing: true end end end