问题描述
我终于找到了这个问题的解决方案,结果证明它困扰着许多 wordpress 安装.通过编辑器中的添加媒体"按钮上传图像后,上传将失败并显示上传错误中发生错误".然而,刷新后图像会出现在媒体浏览器窗口中,但当插入到编辑器中时,它会显示宽度和高度都设置为 1px.
I finally found the solution to this problem which as turns out plagues many wordpress installations. Right after uploading an image through the "add media" button in an editor, the upload would fail with a "an error occurred in the upload error". However after refreshing the image would appear in the media browser window but when inserted into the editor it would show up with width and height both set to 1px.
在搜索了很多没有任何成功之后,我解决了这个问题.许多人报告说通过一一禁用所有插件来找到导致问题的原因来解决它.就我而言,这是一个全新的 wordpress 安装,没有其他任何东西,甚至没有自定义主题.所以我决定把它贴在这里,以防其他人搜索并偶然发现这篇文章.
After searching a lot without any success I solved the problem. Many people reported solving it by disabling all plugins one by one to find which was causing the problem. In my case it was a fresh wordpress installation without anything else, not even custom themes.So I decided to post it here in case anyone else is search and stumbles upon this post.
推荐答案
原来罪魁祸首是 imagemagick.我在 php.ini 中禁用了它,一切又开始工作了.如果您的主机支持它,您可以使用自定义 php.ini 文件.
Turns out the culprit was imagemagick. I disabled it in php.ini and everything started working again. If your host supports it you can use a custom php.ini file.
这篇关于"上传出错.请稍后再试"在 wordpress 中将图像上传到编辑器时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!