code: function transformAttrs (data, tag) {
    let { attrs, directives } = data
    if (!attrs) {
      attrs = data.attrs = {}
    }
    attrs['weex-type'] = tag
    if (tag === 'image' || tag === 'gif') {
      const { src, resize } = attrs
      if (src) {
        attrs['data-img-src'] = src
      }
      if (resize) {
        if (!directives) {
          directives = data.directives = []
        }
        directives.push({
          name: 'weex-resize',
          value: attrs.resize
        })
      }
    }
  }
docs: transformAttrs:
  - add weex-type attrs for precompiledTags.
  - image.resize: transform to directive weex-resize.