Add large number of images to drupal site
I spent some time in understanding how Drupal 6 retrieves images to show on front-end. Since drupal is heavily database intensive, all the files and images are retrieved from the database itself. 

If you are using CCK in your site, you must have created image fields for some content types. Now if you open the database and check the table for respective content type, you will find that there are three columns created for each image cck field namely field_name_fid,field_name_list,field_name_data . 

The field "field_name_fid" is the key field that maps images to this content type. The fid is the key that is matched to the fid of the table "files". If you open this table, you will find that the primary key of this table i.e fid is used to map images throughout Drupal content.

Here comes the solution


Upload an image from the frontend to test where is your file saved
physically in you drupal directory. For every image uploaded to any
node from front-end there will be an entry in the files table with
its filename, filepath, filemime, file size, status and timestamp.
The fields that you should take care about in the files table are filename, uid, filepath, filemime, and status.  
All you have to do is, Place all your files in that physical location.
Run SQL queries to first fill all the fields stated in #2. and match the fid of files table to the field_name_fid of respective content type.


And you are done.