Skip to content

A platform for community discussion. Free, open, simple.

Log error when optimized image file fails to store. (#8840)

Stephen Chung98e9302c261f
diff --git a/app/models/optimized_image.rb b/app/models/optimized_image.rb
index 7902e366e7a..1f839483b51 100644
--- a/app/models/optimized_image.rb
+++ b/app/models/optimized_image.rb
@@ -110,6 +110,8 @@ class OptimizedImage < ActiveRecord::Base
if url.present?
thumbnail.url = url
thumbnail.save
+ else
+ Rails.logger.error("Failed to store optimized image of size #{width}x#{height} from url: #{upload.url}\nTemp image path: #{temp_path}")
end
end
end