TLDR: There is nothing specific to Keycloakify about importing assets. You can do it however you would in any other project.
Just if you're referencing assets that are in the public directory, use import.meta.env.BASE_URL
TLDR: You can import asset like you would in any other project, one exception being: If you reference assets that are located in your public directory from within your TSX files you must use Keycloakify's polifill of the PUBLIC_URL environnement variable, you can't use process.env.PUBLIC_URL directly:
TLDR: If you reference assets that are located in your public directory from within your component you must inject APP_BASE_HREF
Make sure to have it configured as a provider (default in the starter project)
Importing your asset from the public directory has the drawback that you won't get a compilation error if you made a mistake, like for example if you rename a file and forget to update the imports.
A nice solution for this is to let Vite or Webpack handle the import.
Let's move our logo.png to /src/login/assets/logo.png
This will yield the same result except that now if you delete, move or rename the logo.png file you'll get a compilation error letting you know that you must also update your Template.tsx file.