Add check boxes to assign groups to an image

Started trying to make the image gallery be saved, it's not working