<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -575,3 +575,11 @@ system_settings_066:
   id: &quot;66&quot;
   value: &quot;false&quot;
   section: Flagging
+system_settings_067:
+  name: Keep Embedded Metadata For All Sizes
+  technically_advanced: true
+  required_to_be_configured: true
+  explanation: &quot;When creating the different versions of uploaded images, such as thumbnails, should we keep the embedded metadata with the new version of the image? Not transferring embedded metadata to the new versions can make them significantly smaller, especially if the original has an embedded thumbnail version already. On the other hand embedded metadata may contain information that is important to keep, such as copyright holder.&quot;
+  id: &quot;67&quot;
+  value: &quot;false&quot;
+  section: Images</diff>
      <filename>db/bootstrap/system_settings.yml</filename>
    </modified>
    <modified>
      <diff>@@ -54,7 +54,7 @@ module ResizeAsJpegWhenNecessary
     end
 
     def resize_image(img, size)
-      img.strip! # remove metadata from the resized image
+      img.strip! unless attachment_options[:keep_profile] # remove metadata from the resized image
       img.format = 'JPEG' # set format to JPEG
       self.temp_path = write_to_temp_file(img.to_blob { self.format = 'JPEG' }) if self.class.should_be_converted?(img.format)
       super</diff>
      <filename>lib/resize_as_jpeg_when_necessary.rb</filename>
    </modified>
    <modified>
      <diff>@@ -58,13 +58,19 @@ namespace :kete do
       end
     end
 
-    desc 'Resize original images based on current IMAGE_SIZES and add new ones if needed. Does not remove no longer needed ones (to prevent links breaking).'
+    desc 'Resize original images based on current IMAGE_SIZES and add new ones if needed. Does not remove no longer needed ones (to prevent links breaking). By default image files that match new sizes will be skipped. If you need new versions recreated even if there is an existing file that matches the size, use FORCE_RESIZE=true.'
     task :resize_images =&gt; :environment do
       @logger = Logger.new(RAILS_ROOT + &quot;/log/resize_images_#{Time.now.strftime('%Y-%m-%d_%H:%M:%S')}.log&quot;)
 
       puts &quot;Resizing/created images based on IMAGE_SIZES...&quot;
       @logger.info &quot;Starting image file resizing.&quot;
 
+      force_resize = (ENV['FORCE_RESIZE'] &amp;&amp; ENV['FORCE_RESIZE'] == &quot;true&quot;) ? true : false
+      if force_resize
+        puts &quot;All image sizes will be recreated from originals, even if the same size image file already exists.&quot;
+        @logger.info &quot;FORCE_RESIZE=true&quot;
+      end
+
       # get a list of thumbnail keys
       image_size_keys = IMAGE_SIZES.keys
 
@@ -92,7 +98,7 @@ namespace :kete do
           missing_image_size_keys = missing_image_size_keys - [child_image_file.thumbnail.to_sym]
 
           # if this image doesn't need to be changed, skip it
-          if image_file_match_image_size?(child_image_file)
+          if image_file_match_image_size?(child_image_file) &amp;&amp; !force_resize
             @logger.info &quot;      Child image #{child_image_file.id} does not need resizing&quot;
             next
           end</diff>
      <filename>lib/tasks/tools.rake</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f4101d51477c1133541d03d0d5e2324c20c2a42d</id>
    </parent>
    <parent>
      <id>b420ee21a479985a3be090eda42b7abd7430d0f7</id>
    </parent>
  </parents>
  <author>
    <name>Kieran Pilkington</name>
    <email>kieran@katipo.co.nz</email>
  </author>
  <url>http://github.com/kete/kete/commit/a8d1f37dc16cdf92a5af602817430c07d717f506</url>
  <id>a8d1f37dc16cdf92a5af602817430c07d717f506</id>
  <committed-date>2009-11-08T13:29:23-08:00</committed-date>
  <authored-date>2009-11-08T13:29:23-08:00</authored-date>
  <message>Merge branch 'master' of github.com:kete/kete into enhancement_241_comment_system_improvements</message>
  <tree>8e0b2f052ee17a83154bf3f184359fb3c6d288db</tree>
  <committer>
    <name>Kieran Pilkington</name>
    <email>kieran@katipo.co.nz</email>
  </committer>
</commit>
