From 1bd37446762e97c799f44c4384c54853265dd3ec Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 19 Apr 2013 09:50:23 +1000 Subject: [PATCH] disable image optimization for now --- lib/cooked_post_processor.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/cooked_post_processor.rb b/lib/cooked_post_processor.rb index 9ea2f370f..a9372135c 100644 --- a/lib/cooked_post_processor.rb +++ b/lib/cooked_post_processor.rb @@ -71,6 +71,26 @@ class CookedPostProcessor def optimize_image(img) src = img["src"] + return src + + # implementation notes: Sam + # + # I have disabled this for now, would like the following addressed. + # + # 1. We need a db record pointing the files on the file system to the post they are on, + # if we do not do that we have no way of purging any local optimised copies + # + # 2. We should be storing images in /uploads/site-name/_optimised ... it simplifies configuration + # + # 3. I don't want to have a folder with 10 million images, let split it so /uploads/site-name/_optimised/ABC/DEF/AAAAAAAA.jpg + # + # 4. We shoul confirm that that we test both saving as jpg and png and pick the more efficient format ... tricky to get right + # + # 5. All images should also be optimised using image_optim, it ensures that best compression is used + # + # 6. Admin screen should alert users of any missing dependencies (image magick, etc, and explain what it is for) + # + # 7. Optimise images should be a seperate site setting. # supports only local uploads return src if SiteSetting.enable_imgur? || SiteSetting.enable_s3_uploads?