hi, (i'm going to assume that the question is about images used by assets)

the exact mechanism depends on the type of @encoding that you specify when calling an asset. for @encoding=dataURI or @encoding=base64 it is just buffer serialization (buffer.toString('base64')) the only difference is that @encoding=dataURI adds a bit more data to make possible inline an image in the src attribute of an img tag.