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 -r1.15 -r1.16
--- openacs-4/packages/acs-content-repository/tcl/image-procs.tcl	14 Sep 2018 10:35:07 -0000	1.15
+++ openacs-4/packages/acs-content-repository/tcl/image-procs.tcl	14 Sep 2018 11:04:42 -0000	1.16
@@ -59,15 +59,14 @@
     @error
 } {
     if {$width eq "" || $height eq ""} {
-	foreach {width height} [image::get_file_dimensions \
-				    -filename $tmp_filename \
-				    -mime_type $mime_type] {}
-
+	lassign [image::get_file_dimensions \
+                     -filename $tmp_filename \
+                     -mime_type $mime_type] width height
     }
-    if {[util_search_list_of_lists $attributes width]<0} {
+    if {[lsearch -index 0 $attributes "width"] < 0} {
 	lappend attributes [list width $width]
     }
-    if {[util_search_list_of_lists $attributes height]<0} {
+    if {[lsearch -index 0 $attributes "height"] < 0} {
 	lappend attributes [list height $height]
     }
     return [content::item::new \