Index: openacs-4/packages/acs-content-repository/tcl/image-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/image-procs.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/acs-content-repository/tcl/image-procs.tcl 17 Jan 2008 17:18:36 -0000 1.6 +++ openacs-4/packages/acs-content-repository/tcl/image-procs.tcl 29 Aug 2008 14:53:42 -0000 1.7 @@ -386,3 +386,18 @@ } { return [db_string get_resized_item_id "" -default ""] } + +ad_proc -private image::resize_existing_images { +} { + Generate thumbnails for images already in the CR +} { + foreach {size_name dimensions} [image::get_convert_to_sizes] { + + foreach item_id [db_list get_items "select item_id from cr_items where \content_type='image' and latest_revision is not null"] { + image::resize \ + -item_id $item_id \ + -size_name $size_name + } + } +} +