微件:ImgTag:修订间差异
跳转到导航
跳转到搜索
无编辑摘要 |
无编辑摘要 |
||
| 第33行: | 第33行: | ||
<!--{if !empty($height)}-->height="<!--{$height|escape:'html'}-->"<!--{/if}--> | <!--{if !empty($height)}-->height="<!--{$height|escape:'html'}-->"<!--{/if}--> | ||
<!--{if !empty($style)}-->style="<!--{$style|escape:'html'}-->"<!--{/if}--> | <!--{if !empty($style)}-->style="<!--{$style|escape:'html'}-->"<!--{/if}--> | ||
<!--{if !empty($class)}--> | <!--{if !empty($class)}-->class="<!--{$class|escape:'html'}-->"<!--{/if}--> | ||
<!--{* Loading behavior *}--> | <!--{* Loading behavior *}--> | ||
2024年12月22日 (日) 20:54的版本
这个微件是<img>的微件实现,用来兼容百科上现存的外链图片。绝大部分情况下,不建议使用这个微件,而是把图片上传到百科然后使用wikitext引用图片。
使用:
{{#widget:ImgTag|url=链接|width=宽度(默认auto)|height=高度(默认auto)}}
所有可用参数:
- src
- alt
- width
- height
- style
- class
- loading
- decoding
- fetchpriority
- sizes
- srcset
- crossorigin
- referrerpolicy