if switch for videos and photos