added mysql query for modified images