All the images and SVGs should go into corresponding subdirectories of the assets folder.
The 2 reasons why you should always keep theme-related assets in this folder are:
- Because of a useful utility function
tr_get_media, that we can use to easily display images/SVGs on our pages.
Quick example of the tr_get_media function
In this example, tr_get_media will asynchronously get an SVG from the assets/svg/ directory. If we omit the “true” as the second argument, it will just print the SVG synchronously.
Read more about tr_get_media and other utility functions that you can use on the Theme Functions page.