简体   繁体   中英

"Unable to create new image" WordPress

This problem looks like it's not had a clear solution as yet. I have installed a clean version of WordPress via SSH with folder permissions set to 755 and file permissions to 644.

I have no problem uploading images, updated plugins etc, but when it comes to editing an image I receive this error:

在此处输入图片说明

WP_DEBUG shows nothing, and there are no other errors on the website.

The most likely reason is not having mod-gd installed.

WordPress uses the GD Graphic Library to manipulate images (see wp-admin/includes/image.php ), and this error appears when it is not installed.

It can also be caused by whitespace introduced somewhere. Check for any php closing tags ?> and remove them. They should not be used because whitespace can be introduced after them.

同样的问题,我忘了用 php 安装 gd ......安装它解决问题:

sudo apt install php7.2-gd

It happened to me when I tried to restore image after scaling and the max size was below the original image size. I couldn't change max size but found copy of my image on google and just replaced it.

If you are working online with a hosting company and have cpanel as your hosting platform you can enable this module in Cpanel through
PHP Selector---> extensions---> gd .

See pictures bellow

Cpanel ( PHP Selector)

extensions --> gd

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM