So Bram, you'd need to use CFDIRECTORY to query the files you want to put into your database, output that query to create hidden form parameters, again in a javascript tag to prepare some images, and once again to run a javascript function for every record to set those hidden parameters.
1. Loop through your output in the page, accept only files (not . or .. which are directories) where listGetAt(name,2,"."

is "jpg" or "gif" (image files). Create 3 hidden parameters for each record returned (name,width,height).
<html>
<form name="theForm">
<CFSET incr=0>
<CFOUTPUT query="theDirectoryQuery">
<CFIF type is not "dir" AND name is not "." AND name is not "..">
<CFIF listContainsNoCase(name, "gif"

OR listContainsNoCase(name, "jpg"

>
<CFSET incr=incr+1>
<!-- inputs for #incr# -->
<input type="hidden" name="imgName#incr#" value="#trim(lcase(name))#">
<input type="hidden" name="imgW#incr#" value="">
<input type="hidden" name="imgH#incr#" value="">
</CFIF>
</CFIF>
</CFOUTPUT>
</form>
</html>
2. Use a javascript function to set the values of those hidden parameters. To do this, first prep a variable for each image using the #incr# variable. Then execute the function once for every record. Take out the alert() when you're done debugging.
<script language="javascript">
<!--
doc = document.forms["theForm"];
<CFSET incr = 0>
<CFOUTPUT query="theDirectoryQuery">
<CFSET incr=incr+1>
var img#incr# = new Image();
img#incr#.src = '#trim(lcase(name))#';
</CFOUTPUT>
<CFSET incr = 0>
<CFOUTPUT query="theDirectoryQuery">
<CFSET incr=incr+1>
go(#incr#);
</CFOUTPUT>
function go

{
var temp = eval('img' + n);
//width
var hidParamW = 'imgW' + n;
doc[hidParamW].value = temp.width;
//height
var hidParamH = 'imgH' + n;
doc[hidParamH].value = temp.height;
//test
alert('width: ' + doc[hidParamW].value + ' height: ' + doc[hidParamH].value);
}
//-->
</script>
Once this page is run, your result will be 3 hidden form parameters for every file returned in the query. Their values will be set, and you'll then need to submit that form and populate your database accordingly.