Simplify syntax
The following macro:
"png" ""
It will let you to just type:
{{png example}}
but when the block is not in edit mode Logseq will just render it like you wrote:

this macro makes much sense if you use a lot of PNG images and you want to get rid of the .png
too; you can define other macros for other formats.
Same with assets in different folders
In case you place assets in folders other than /assets
you can mention them in the macros:
"course" ""
"drawing" ""
and eventually if you decide to edit the folder structure of your assets you just need to edit the macros definitions and not to edit all your Markdown files.
Refer assets to current page
Let’s say you have many pages with (numbered) images and you want to keep them organized in folders.
If for example you create for each page a folder like this (including [[]]
):
graph/assets/[[Page Name]]
then you can use a macro like this one:
"current" ""
so that something like this:
{{current 01.png}}
will render different images according to the page it is placed in.