1.0.2 • Published 6 years ago
hexo-tag-img v1.0.2
hexo-tag-img
Inserts an image with specified size.
This is a Hexo image tag plugin extension.
After installing this plugin, the original img tag plugin will be replaced by this tag plugin.
Installation
npm install --save hexo-tag-imgSyntax
Inserts an image with specified size.
{% img [class names] /path/to/image [width] [height] "title text" "alt text" %}
{% image [class names] /path/to/image [width] [height] 'title text' 'alt text' %}',"symbols are allowed in title and alt.titleandaltmust be quoted with"or'.- For security concerns, the value of attributes will be escaped.
Syntax of the Original Version
Inserts an image with specified size. See more
{% img [class names] /path/to/image [width] [height] "title text 'alt text'" %}
{% image [class names] /path/to/image [width] [height] "title text 'alt text'" %}Issues of this version
- Can't use
',"symbols in title and alt. Should use escaped text',". - The value of title and alt is not escaped.
- https://github.com/hexojs/hexo/issues/1277
License
Copyright (c) 2019 dailyrandomphoto. Licensed under the MIT license.