Database connection to load images