Last active
December 13, 2015 17:58
-
-
Save alfasado/4951277 to your computer and use it in GitHub Desktop.
Using the data URI scheme in MTML. https://github.com/alfasado/mt-plugin-asset2base64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mt:Asset id="1"> | |
<mt:AssetThumbnailFile width="32" square="1" convert2base64="1" setvar="src"> | |
<mt:Var name="src" get_content_length="1" setvar="image_size"> | |
<mt:If name="image_size" lt="32768"> | |
<img src="data:<mt:AssetMimeType>;base64,<mt:Var name="src">" width="32" height="32" alt="<mt:AssetLabel escape="html">" /> | |
<mt:else> | |
<img src="<mt:AssetThumbnailURL>" width="32" height="32" alt="<mt:AssetLabel escape="html">" /> | |
</mt:If> | |
</mt:Asset> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment