checking for image private/public status using get_image in function compare_images