Home>Article>CMS Tutorial> How to automatically add image watermarks in Imperial CMS
How does Empire CMS automatically add image watermarks? The following article will introduce to you howEmpireCMSautomatically adds image watermarks. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.
Related recommendations: "Empire cms tutorial"
When uploading images to Imperial CMS, let the program automatically add watermarks. The principle is Let the watermark checkbox where you upload pictures be checked by default!
First, when inserting our own pictures into the text, generally speaking, it is 100% required to add a watermark. Therefore, I automatically checked Add Watermark on the editor so that I don’t have to manually check it every time.
The most comprehensive solution for automatically adding image watermarks to Imperial CMS 1.png
Modification method:
1. Find the file e/admin/ecmseditor/infoeditor/epage/TranImg.php
2. Find
3 and change it to
. However, there is a situation where when the image size is very small, such as when the width or height is less than 400px, a watermark is added at this time, and the watermark will cover part of the image content. , resulting in poor usability. Therefore, at this time, manually check the check box for adding watermark and remove it. In fact, it is best to use a program to judge the size to decide whether to add or not. It is easy to forget the crude method of manually removing the check box.
Two, sometimes we can insert pictures from other people’s websites into the text. But for high operation efficiency, you can directly paste the pictures from the picture website, and then check "Remotely Save Pictures" at the bottom of the editor, and also check the watermark check. In this way, when saving the article, the program will automatically download → upload → add watermarks to the pictures on other people's websites. This effect is the same as uploading pictures manually.
The most comprehensive solution for automatically adding image watermarks to Empire CMS 2.png
Modification method:
1. System settings→Manage data table→Select article system or news system→Manage fields→News text ( newstext) → Modify
2, find
3, and change it to
3. There is also a setting for adding watermarks, as shown below:
Empire CMS is the most comprehensive in automatically adding image watermarks Solution 3.png
There are three scenarios for opening this pop-up window. Each scenario is analyzed separately:
1. Click to open from the title image. Some articles need to upload a title image, also called a thumbnail image, or a header image. We usually crop pictures of this size using PS. The original size of the picture is relatively small, so there is no need to add a watermark. Therefore, it is better to uncheck the watermark option by default.
2. In the first point, click Image Upload on the editor, then on the pop-up window that opens, click "Browse Server" again, and then open the pop-up window. We generally do not require editors to upload new images in this way. This is only suitable for selecting already uploaded images.
3. When uploading column thumbnails on the column information modification page. Since it is a thumbnail, the size is also very small, and it is not suitable for automatic watermarking.
Therefore, it is best not to automatically check the watermark option on the control for uploading the title image. If you have to do:
1. Find the file /e/admin/ecmseditor/file.php
2. Find
3. Modify it to
The above method is based on your own choice use.
For more programming-related knowledge, please visit:Programming Teaching! !
The above is the detailed content of How to automatically add image watermarks in Imperial CMS. For more information, please follow other related articles on the PHP Chinese website!