Complete web application for sorting images in database