# A simple syntax if you just want some thumbnails img_2 => [ { name => 'img_2_thumb_1', w => 100, h => 100 }, ], # And a very simple syntax if you want to store the image untouched. img_3 => [], }; # Create the accessor. This could be done once in a super class # and stored in a param variable. my $media_srv = CGI::ImageDB->new( media_url => 'http://localhost/com/images/media', media_dir => '/home/user/www/images/media', dbh => $dbh, media_table => 'media', # defaults to 'media' media_def => \%Media, );