Inline Separate SVG Files
Learn how to use fragments for inline SVG images.
We'll cover the following
We can also use fragments to inline SVG images. This works well out of the box if we name the file my-icon.html
as Thymeleaf searches for .html
files.
We could also simply use the .svg
extension for them as we normally would. To do this, we need to create the src/main/resources/templates/svg
directory and then create the dashboard.svg
file:
Get hands-on with 1200+ tech skills courses.