It better to store images on the file system, and only store the path describing their location in the database. However, if you absolutely must store images in the database, you need to use a BLOB or CLOB datatype in your table and used the setBlob() method of a PreparedStatement.