Twig Components / Methods / asset
asset(path, packageName = null)
string | null default:
asset is a Twig function to return the public path of the given asset path (which can be a
e.g. in case the project is accessed in a host subdirectory) and the optional asset package base path.
Symfony provides various cache busting implementations via the version, version_strategy, and json_manifest_path configuration options.