nl_tokens: Returns image dimensions for source
pl_tokens: function getImageSizeForSource ( editor , src , callback ) { var fileContent ; var au = require ( 'actionUtils' ) ; if ( src ) { // check if it is data:url if ( / ^data: / . test ( src ) ) { fileContent = require ( 'base64' ) . decode ( src . replace ( / ^data\:.+?;.+?, / , '' ) ) ; return callback ( au . getImageSize ( fileContent ) ) ; } var file = require ( 'file' ) ; var absPath = file . locateFile ( editor . getFilePath ( ) , src ) ; if ( absPath === null ) { throw "Can't find " + src + ' file' ; } file . read ( absPath , function ( err , content ) { if ( err ) { throw 'Unable to read ' + absPath + ': ' + err ; } content = String ( content ) ; <mask> ( au . getImageSize ( content ) ) ; } ) ; } }