# 帝国CMS内容页设置图片自动添加水印方法

*Published:* 2023-11-19
*Author:* 客服001

#### 温馨提醒

如果文章内容或图片资源失效，请留言反馈，我们会及时处理，谢谢

本文最后更新于2023年11月19日，已超过 180天没有更新



1、定位文件

```
e/admin/ecmseditor/infoeditor/epage/TranImg.php
```

查找代码：

```
<input name="getmark" type="checkbox" id="getmark" value="1">
```

修改为：

```
<input name="getmark" type="checkbox" id="getmark" value="1" checked>
```

替换成上面的代码即可默认勾选。

同时，如果我们是编辑文章复制[图片](https://www.xarjtc.com/tag/pic "查看图片此标签更多文章")到编辑器的时候，如果希望自动勾选添加[水印](https://www.xarjtc.com/tag/%e6%b0%b4%e5%8d%b0 "查看水印此标签更多文章")，也需要修改。

找到"系统设置 → 管理数据表 → 选择文章系统或新闻系统 → 管理字段 → 新闻正文（newstext）→ 修改"。

找到代码：

```
<input name="mark" type="checkbox" id="mark" value="1">
```

替换为：

```
<input name="mark" type="checkbox" id="mark" value="1" checked>
```