WordPress:媒体库损坏的图像 [英] WordPress : Media Library broken images

查看:74
本文介绍了WordPress:媒体库损坏的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将图像上传到WordPress时,它们随机显示为断开的链接.

When I upload image to WordPress, they randomly appear as broken links.

我可以将文件拖放到媒体库"中,也可以选择选择",某些文件始终显示为损坏.

I can drop the files on the Media Library or Select the files and some files are always shown as broken.

我可以删除文件并重新上传同一组,并且该组中的不同图像可能显示为损坏.

I can delete the files and re-upload the same group and different images in the group can show as broken.

我确信这些图像无关紧要,因为它们有时看起来像是破碎的,有时却没有.

I'm sure it's nothing to with the images as they sometimes appear as broken and then sometimes don't.

在本地上传正常,该问题开始在实时托管中发生-我认为这可能与权限有关,但是然后它不会将所有图像都显示为损坏,而不会将随机图像显示为损坏.

Locally the upload works fine, this problem started happening on the live hosting - I thought it could be something to do with permissions but then wouldn't it show all the images as broken and not show random images as broken.

我没有收到错误,但是图像图标坏了.如果单击断开的链接,则会显示附件详细信息"页面.有时图片确实出现在这里,有时却没有出现.

I don't get an error but a broken image icon. If I click the broken link it case me to the Attachment Details page. Sometimes the image does appear here sometimes it doesn't.

推荐答案

一些需要寻找的东西:

1)检查wp-content/uploads文件夹中是否有.htaccess文件,或者将图像保存在什么位置(请确保您可以选择查看隐藏文件-我认为默认情况下,当您使用这些文件时,它们是可用的)使用的是FTP客户端,但如果您位于CPanel的文件管理器中,则必须在输入文件管理器之前启用此选项,或者在位于文件管理器中时根据设置(取决于主机)启用此选项).如果有htaccess文件,则需要对其进行备份,然后再对此进行更多研究,然后再对其进行任何更改. https://codex.wordpress.org/htaccess_for_subdirectories

1) check if there is an .htaccess file in the wp-content/uploads folder or wherever you keep your images (make sure you have the option to see hidden files--I think they're available by default when you're using an FTP client but if you're in the File Manager of your CPanel then you have to enable this option, either before entering file manager or from settings when you're in the file manager depending on your host). If there is an htaccess file, you'll want to back it up and then research more about this before you make any changes to it. https://codex.wordpress.org/htaccess_for_subdirectories

2)如果您尝试使用wp-config.php移动默认图像目录,请确保已正确设置

2) if you had tried to move your default image directory using wp-config.php make sure that has been set up properly

3)检查文件夹和文件权限设置.最好在FTP客户端中执行此操作,因为如果您需要更改权限,则可以递归地进行操作,并在其中包含所有子目录和文件,而不必进入每个文件夹并更改权限. http://www.wpbeginner.com/wp-tutorials/how-to-fix-image-upload-issue-in-wordpress/

3) check folder and file permissions settings. it's best to do this in an FTP client because if you need to change the permissions, it can do it recursively and include all subdirectories and files within them instead of having to go through into each folder and change the permissions. http://www.wpbeginner.com/wp-tutorials/how-to-fix-image-upload-issue-in-wordpress/

这篇关于WordPress:媒体库损坏的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆