added SQL for image table