Home  >  Article  >  Backend Development  >  What to do if phpcms cannot display PNG images

What to do if phpcms cannot display PNG images

hzc
hzcOriginal
2020-06-05 16:02:423049browse

What to do if phpcms cannot display PNG images

Solution to the problem that PHPCMS cannot display PNG images:

Many PHPCMS users find that PNG watermarks are set in the background, but the images are still added as gifs Watermark, here is a temporary solution. ,

Modify the phpcms_model_field and phpcms_module data tables, change "images/watermark.gif" in the setting field to "images/watermark.png", and then enter the background to update the column cache, so that the PNG watermark can be used !

In fact, the problem lies in the system architecture of PHPCMS. The system and each column have their own setting options, and users can only modify "system settings" but cannot modify individual columns. System settings modified by users will not affect a single column. In this way, when users upload pictures, PHP adds the default gif watermark according to the column settings, ignoring the system watermark settings. Therefore, no matter how the user sets it, the PNG watermark effect cannot be achieved when uploading images.

It is estimated that PHPCMS will add settings for individual columns in subsequent versions, so please just use it like this for now.

Recommended tutorial: "php tutorial"

The above is the detailed content of What to do if phpcms cannot display PNG images. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn