admin管理员组文章数量:1130349
I have an image that I've uploaded through the WP media library. I can see this image in my uploads folder via ssh/ftp. I cannot see this image if I put the URL in my browser, like www.site/files/image.jpg (It's a multisite and all uploads go into individual folders rather than be separated out by months).
In WP, the image shows as broken in the media library listing of uploaded files. Only when I select this image file and choose "edit image" does the image show up.
The 404 is not the regular WP 404 page template, it's a blank page that only says "404 — File not found."
And the best part is that this does not happen for all images/uploads.
Does anyone have any ideas I can take action on?
EDIT: It looks like any file with "pdf" in the file NAME (not file extension) is having this problem. .pdf files work fine. I don't know why the filename would make this happen...
I have an image that I've uploaded through the WP media library. I can see this image in my uploads folder via ssh/ftp. I cannot see this image if I put the URL in my browser, like www.site/files/image.jpg (It's a multisite and all uploads go into individual folders rather than be separated out by months).
In WP, the image shows as broken in the media library listing of uploaded files. Only when I select this image file and choose "edit image" does the image show up.
The 404 is not the regular WP 404 page template, it's a blank page that only says "404 — File not found."
And the best part is that this does not happen for all images/uploads.
Does anyone have any ideas I can take action on?
EDIT: It looks like any file with "pdf" in the file NAME (not file extension) is having this problem. .pdf files work fine. I don't know why the filename would make this happen...
Share Improve this question edited Jan 31, 2013 at 15:07 Jarrod asked Jan 31, 2013 at 13:31 JarrodJarrod 1002 silver badges11 bronze badges 1- The fact that you get a generic 404 makes me think there is a serious server issue/error before WordPress even gets involved. Check your server logs and see if the shed any light. – s_ha_dum Commented Jan 31, 2013 at 15:18
4 Answers
Reset to default 1Also happened to me, because of mod_expires.c
The rules were causing the 404, but the files were OK on FTP:
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access 1 week"
ExpiresByType image/jpg "access 1 week"
ExpiresByType image/jpeg "access 1 week"
ExpiresByType image/png "access 1 week"
</IfModule>
It turned out to be an .htaccess rule put in by a coworker. It was supposed to target just some .pdf files but the rule wasn't written strict enough.
So that was a fun few hours spent on wild goose chases.
I was getting this same exact issue because I had just moved the website to a new server+domain. I had updated the WP_HOME and WP_SITEURL in the wp-config.php but I guess that wasnt enough. The images were being uploaded to the new domain, but was being rendered to HTML with the old domain. I used did a search and replace in the database to permanently remove the old domain.
Had the same issue. Simply go to Settings -> Media and verify the structure of the directory for uploaded files, usually it has the previous route. Simply replace it with wp-content/uploads and thats it.
I have an image that I've uploaded through the WP media library. I can see this image in my uploads folder via ssh/ftp. I cannot see this image if I put the URL in my browser, like www.site/files/image.jpg (It's a multisite and all uploads go into individual folders rather than be separated out by months).
In WP, the image shows as broken in the media library listing of uploaded files. Only when I select this image file and choose "edit image" does the image show up.
The 404 is not the regular WP 404 page template, it's a blank page that only says "404 — File not found."
And the best part is that this does not happen for all images/uploads.
Does anyone have any ideas I can take action on?
EDIT: It looks like any file with "pdf" in the file NAME (not file extension) is having this problem. .pdf files work fine. I don't know why the filename would make this happen...
I have an image that I've uploaded through the WP media library. I can see this image in my uploads folder via ssh/ftp. I cannot see this image if I put the URL in my browser, like www.site/files/image.jpg (It's a multisite and all uploads go into individual folders rather than be separated out by months).
In WP, the image shows as broken in the media library listing of uploaded files. Only when I select this image file and choose "edit image" does the image show up.
The 404 is not the regular WP 404 page template, it's a blank page that only says "404 — File not found."
And the best part is that this does not happen for all images/uploads.
Does anyone have any ideas I can take action on?
EDIT: It looks like any file with "pdf" in the file NAME (not file extension) is having this problem. .pdf files work fine. I don't know why the filename would make this happen...
Share Improve this question edited Jan 31, 2013 at 15:07 Jarrod asked Jan 31, 2013 at 13:31 JarrodJarrod 1002 silver badges11 bronze badges 1- The fact that you get a generic 404 makes me think there is a serious server issue/error before WordPress even gets involved. Check your server logs and see if the shed any light. – s_ha_dum Commented Jan 31, 2013 at 15:18
4 Answers
Reset to default 1Also happened to me, because of mod_expires.c
The rules were causing the 404, but the files were OK on FTP:
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access 1 week"
ExpiresByType image/jpg "access 1 week"
ExpiresByType image/jpeg "access 1 week"
ExpiresByType image/png "access 1 week"
</IfModule>
It turned out to be an .htaccess rule put in by a coworker. It was supposed to target just some .pdf files but the rule wasn't written strict enough.
So that was a fun few hours spent on wild goose chases.
I was getting this same exact issue because I had just moved the website to a new server+domain. I had updated the WP_HOME and WP_SITEURL in the wp-config.php but I guess that wasnt enough. The images were being uploaded to the new domain, but was being rendered to HTML with the old domain. I used did a search and replace in the database to permanently remove the old domain.
Had the same issue. Simply go to Settings -> Media and verify the structure of the directory for uploaded files, usually it has the previous route. Simply replace it with wp-content/uploads and thats it.
本文标签:
版权声明:本文标题:uploads - Image uploaded in media library, can only see it when I using the WP Edit Image feature. 404 when trying to view in br 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749082652a2313289.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论