Add function and image for flag