wordpress crop 截图 not working 没有生成 缩略图问题

去查看 php 配置有没有开启 gd 功能


如果 phpinfo 里没有发现 gd ,则需要安装 gd 模块,ubuntu 安装如下:

# apt-get install php5-gd
OR
$ sudo apt-get install php5-gd

Sample outputs (from my Debian server)

apt-get install php5-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libgd2-xpm
Suggested packages:
  libgd-tools
The following packages will be REMOVED:
  libgd2-noxpm
The following NEW packages will be installed:
  libgd2-xpm php5-gd
0 upgraded, 2 newly installed, 1 to remove and 7 not upgraded.
Need to get 270 kB of archives.
After this operation, 176 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://debian.osuosl.org/debian/ squeeze/main libgd2-xpm amd64 2.0.36~rc1~dfsg-5 [231 kB]
Get:2 http://security.debian.org/ squeeze/updates/main php5-gd amd64 5.3.3-7+squeeze9 [39.1 kB]
Fetched 270 kB in 2s (124 kB/s)
dpkg: libgd2-noxpm: dependency problems, but removing anyway as you requested:
 libgvc5 depends on libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg); however:
  Package libgd2-noxpm is to be removed.
  Package libgd2-xpm is not installed.
(Reading database ... 206928 files and directories currently installed.)
Removing libgd2-noxpm ...
Selecting previously deselected package libgd2-xpm.
(Reading database ... 206919 files and directories currently installed.)
Unpacking libgd2-xpm (from .../libgd2-xpm_2.0.36~rc1~dfsg-5_amd64.deb) ...
Setting up libgd2-xpm (2.0.36~rc1~dfsg-5) ...
Selecting previously deselected package php5-gd.
(Reading database ... 206930 files and directories currently installed.)
Unpacking php5-gd (from .../php5-gd_5.3.3-7+squeeze9_amd64.deb) ...
Processing triggers for libapache2-mod-php5 ...
Reloading web server config: apache2.
Setting up php5-gd (5.3.3-7+squeeze9) ...
完成完成后 重启服务器 nginx 

sudo service nginx restart

之后再去查看 phpinfo 信息如果出现 gd 模块,说明已经成功。wordpress 截图已可用。



如果是wordpress 最好 把下边一个 php 扩展也安装了。

sudo apt-get update
sudo apt-get install libssh2-php

你可能感兴趣的:(wordpress crop 截图 not working 没有生成 缩略图问题)