微件:ImgTag:修订间差异
舰R百科,玩家自由编辑的战舰少女R百科
更多操作
无编辑摘要 |
无编辑摘要 |
||
| (未显示同一用户的21个中间版本) | |||
| 第1行: | 第1行: | ||
<noinclude> | |||
这个微件是<nowiki><img></nowiki>的微件实现,用来1.42版本之后MW不再支持wikitext内使用<nowiki><img></nowiki>,兼容百科上现存的外链图片。除非有很好的理由并经过管理确认,不应该使用这个微件引用任何新图片,而是应该把图片上传到百科然后使用wikitext引用图片。 | |||
使用: | |||
<code><nowiki> | |||
{{#widget:ImgTag|src=链接|width=宽度(默认auto)|height=高度(默认auto)}} | |||
</nowiki></code> | |||
所有可用参数: | |||
* src | |||
* alt | |||
* width | |||
* height | |||
* style | |||
* class | |||
* loading | |||
* decoding | |||
* fetchpriority | |||
* sizes | |||
* srcset | |||
* crossorigin | |||
* referrerpolicy | |||
</noinclude> | |||
<includeonly> | <includeonly> | ||
<img | <img | ||
<!--{* Required attribute *}--> | |||
<!--{if !empty($src)}-->src="<!--{$src|escape:'html'}-->"<!--{/if}--> | |||
<!--{* Core attributes *}--> | |||
<!--{if !empty($alt)}-->alt="<!--{$alt|escape:'html'}-->"<!--{/if}--> | |||
<!--{if !empty($width)}-->width="<!--{$width|escape:'html'}-->"<!--{/if}--> | |||
<!--{if !empty($height)}-->height="<!--{$height|escape:'html'}-->"<!--{/if}--> | |||
<!--{if !empty($style)}-->style="<!--{$style|escape:'html'}-->"<!--{/if}--> | |||
<!--{if !empty($class)}-->class="<!--{$class|escape:'html'}-->"<!--{/if}--> | |||
<!--{* Loading behavior *}--> | |||
<!--{if !empty($loading)}-->loading="<!--{$loading|escape:'html'}-->"<!--{/if}--> | |||
<!--{if !empty($decoding)}-->decoding="<!--{$decoding|escape:'html'}-->"<!--{/if}--> | |||
<!--{if !empty($fetchpriority)}-->fetchpriority="<!--{$fetchpriority|escape:'html'}-->"<!--{/if}--> | |||
<!--{* Responsive image attributes *}--> | |||
<!--{if !empty($sizes)}-->sizes="<!--{$sizes|escape:'html'}-->"<!--{/if}--> | |||
<!--{if !empty($srcset)}-->srcset="<!--{$srcset|escape:'html'}-->"<!--{/if}--> | |||
<!--{* Security and privacy *}--> | |||
<!--{if !empty($crossorigin)}-->crossorigin="<!--{$crossorigin|escape:'html'}-->"<!--{/if}--> | |||
<!--{if !empty($referrerpolicy)}-->referrerpolicy="<!--{$referrerpolicy|escape:'html'}-->"<!--{/if}--> | |||
/> | /> | ||
</includeonly> | </includeonly> | ||