Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Copa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Como corrigir o problema de upload de imagens no WordPress (passo a passo)

Nota editorial: Ganhamos uma comissão de links de parceiros no WPBeginner. As comissões não afetam as opiniões ou avaliações de nossos editores. Saiba mais sobre Processo editorial.

Você está enfrentando problemas de upload de imagens em seu site WordPress?

Para a maioria dos iniciantes, os erros de upload de imagens podem ser bastante confusos porque podem aparecer sem que você faça nada de diferente. De fato, a falha no carregamento de imagens é um dos problemas de imagem mais comuns no WordPress. Felizmente, é muito fácil corrigi-lo e você mesmo pode fazer isso.

Neste artigo, mostraremos como corrigir o problema de upload de imagens no WordPress.

Fixing image upload issues in WordPress

Tutorial em vídeo

Subscribe to WPBeginner

Se você preferir instruções por escrito, continue lendo.

O que causa o problema de upload de imagens no WordPress?

O problema de upload de imagens no WordPress geralmente é causado por permissões de arquivo incorretas. Seus arquivos do WordPress são armazenados no servidor de hospedagem na Web e precisam de permissões específicas de arquivo e diretório para funcionar.

Permissões de arquivo incorretas impedem que o WordPress leia ou faça upload de arquivos no servidor de hospedagem. Você pode receber o seguinte erro do WordPress ao fazer o upload de um arquivo de imagem:

‘Não foi possível criar o diretório wp-content/uploads/2019/04. Seu diretório pai pode ser gravado pelo servidor?

Unable to create directory error

Ou você pode ver o erro:

‘O arquivo carregado não pôde ser movido para wp-content/uploads/’.

Outro sinal desse problema é que suas imagens desaparecem da biblioteca de mídia do WordPress.

Missing images in media library

Meu site estava funcionando bem antes. Quem alterou as permissões de arquivo?

Isso pode acontecer devido a vários motivos. Uma configuração incorreta em seu servidor de hospedagem compartilhada pode, às vezes, alterar essas permissões sem que você faça nada.

Por exemplo, seu provedor de hospedagem na Web executou uma atualização que alterou inesperadamente as permissões de arquivo.

Se tudo o mais estiver funcionando bem em seu site WordPress, basta aplicar as permissões de arquivo corretas para corrigir o problema de upload de imagem.

Dito isso, vamos dar uma olhada em como definir as permissões de arquivo corretas para corrigir problemas de upload de imagens no seu site WordPress.

Como corrigir o problema de upload de imagens no WordPress

Para alterar as permissões dos arquivos, você precisará usar um cliente FTP.

Primeiro, conecte-se ao seu site via FTP e, em seguida, vá para a pasta /wp-content/. Dentro dela, você encontrará a pasta uploads, que é onde o WordPress armazena todos os uploads de mídia, inclusive imagens.

Agora, clique com o botão direito do mouse no diretório de uploads e selecione “File Permissions” (Permissões de arquivo).

Opening file permissions dialog box for uploads folder

Isso abrirá a caixa de diálogo de permissões de arquivo.

Primeiro, você precisará definir as permissões de arquivo para o diretório de uploads e todos os subdiretórios dentro dele como “744”.

Change folder permissions

Para fazer isso, digite 744 na caixa de valor numérico e marque a caixa ao lado de “Recurse into subdirectories”. Agora, clique no botão de opção Apply to directories only (Aplicar somente a diretórios).

Clique no botão “OK” para aplicar essas alterações. Seu cliente FTP começará a aplicar as permissões de arquivo aos diretórios.

Observação: se a configuração das permissões de diretório para 744 não resolver seu problema, tente 755.

Na próxima etapa, você precisará definir permissões de arquivo para todos os arquivos no diretório de uploads.

Para fazer isso, clique com o botão direito do mouse no diretório de uploads e selecione permissões de arquivo. Na caixa de diálogo de permissões de arquivo, altere o valor numérico para “644”.

Marque a caixa ao lado de “Recurse into subdirectories”. Em seguida, você precisa clicar no botão de opção Apply to files only” (Aplicar somente a arquivos).

Por fim, basta clicar no botão “OK” para aplicar essas alterações.

File permissions

O cliente FTP agora alterará as permissões de todos os arquivos dentro da pasta de uploads. Quando isso for feito, você poderá voltar à área de administração do WordPress e tentar carregar imagens novamente.

Se você tiver algum formulário de upload de arquivo em seu site, teste-o também.

Observação: se você não souber como usar um cliente FTP, também poderá usar o gerenciador de arquivos fornecido pela empresa de hospedagem do WordPress. Como as capturas de tela variam de acordo com a hospedagem, você precisará falar com o suporte deles para obter instruções.

Esperamos que este artigo tenha ajudado você a corrigir o problema de upload de imagens no WordPress. Talvez você também queira ver nosso artigo sobre como escolher a melhor hospedagem WordPress ou nossa comparação das melhores alternativas da GoDaddy.

Se você gostou deste artigo, inscreva-se em nosso canal do YouTube para receber tutoriais em vídeo sobre o WordPress. Você também pode nos encontrar no Twitter e no Facebook.

Divulgação: Nosso conteúdo é apoiado pelo leitor. Isso significa que, se você clicar em alguns de nossos links, poderemos receber uma comissão. Veja como o WPBeginner é financiado, por que isso é importante e como você pode nos apoiar. Aqui está nosso processo editorial.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

O kit de ferramentas definitivo WordPress

Obtenha acesso GRATUITO ao nosso kit de ferramentas - uma coleção de produtos e recursos relacionados ao WordPress que todo profissional deve ter!

Reader Interactions

297 ComentáriosDeixe uma resposta

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Spencer says

    None of these comments or the original post seem to solve the issue for me. :(
    Totally random. No idea why this would occur mid way between an upload.

  3. Angela says

    What if I’m working on a localhost with xampp and I don’t have upload the website on a hosting site? Right now half of my images are ok but the other half I’m uploading are broken, as it shows.

  4. Kenny says

    I just installed WordPress 4.1.1 for the first time, and I can’t upload any images at all. Says HTTP error. I tried changing the permission in FTP, made no differences, still can’t upload images. Can you please help?

  5. EKO says

    ATTENTION

    If after this fix… images still fail to upload….

    Go to your site in your favorite privacy enabled browser ;)

    WORDPRESS>>>SETTING>>>MEDIA>>>

    Change “Large Size” dimensions to Max width “4400” Max Height “4400” or whatever the largest size image you plan on uploading!

    Enjoy the fix after the fix!

  6. Tbwhs.com says

    I recently had this problem. I believe my site was hacked or something. I downloaded a plugin that was pirated or so I believe. I think there was a back door virus in it or something. Kind of odd because someone uploaded a bunch of images today and then I suddenly got this error message and I couldn’t upload anymore images through WordPress.

    Always change your FTP once a year to prevent hacks :). I do it just to be safe.

  7. Malene Overgaard says

    Great post and even though the suggested didn’t work for me, I was inspired to deactivate latest updated plugins which actually fixed the problem – If any run into this problem all of sudden, the try deactivating the plugins first.

  8. Sruthi says

    My images are not uploading and error occuring in saving media attachment message is coming so plz solve the issue i have tried above solution but it is not working

  9. Minki says

    Just to help on this – I thought I had the same issue, followed the steps above and still nothing. I tried a different image and that worked OK. I then realised that, though the image I was trying to upload was small enough file wise, and was a png, it was WAY too big dimension wise. I scaled it, tried again and it worked. Just thought I would mention this as the problem may be something as simple as that!

  10. Macca Xinlei Lee says

    I screwed up my file permissions because of this and now my site doesn’t display any images at all. Jesus Christ how do I fix this now?

  11. Dave Howard says

    I also had this problem. After a lot of trial and error, it turned out that something in WP was duplicating files. This took up all of my upload space. I deleted these files and it all worked again.

  12. Dr. Shawn Soszka says

    I’m having a problem when uploading images to one of my WP installs. I have several others on the same server and the images upload normally on these installs.

    I’ve tried changing the CHMOD codes for both the upload directory (755), disabling all of the plugins, etc. No effect.

    Every image I upload results in the broken image file showing up in the media gallery and on the site.

    Oddest part is this all started last month after years without problems.

    Even odder: the upload directory stopped making monthly folders, even when the box is checked in settings!

    Any thoughts?

  13. Dr. Shawn Soszka says

    I’m having the same problem, with my main WP install, the others work fine. I’ve tried changing the CHMOD codes as recommended, disabling all of the plugins, etc. No effect. Every image I upload results in the broken image file showing up in the media gallery and on the site. Oddest part is this all started last month after years without problems. Even odder: the upload directory stopped making monthly folders, even when the box is checked in settings! Any thoughts?

    FIXED: I found that I had duplicate wp-content/upload folders and my wp settings/media was pointing to the wrong folder.

  14. zilla says

    hello, last week I experienced problems with 90% images on my new wp site, I think that it is related to recent upload of a new plugin. I have deactivated all plug-ins, and it solved the problem, all images showed up again on the site. One week after that miraculous repair of the site images disappeared again… I tried all your suggestions and changed the permissions, but Filezilla shows message: command not understood… please help me

  15. Amura-AN says

    I can’t even go further than “browse” to get onto the Media Library.
    It is taking ages , 15 minutes , I have been still waiting?
    Any idea whats wrong with that? I also contacted my web designer but its worth asking around while I am waiting. Thanks

  16. keko_jones says

    i’m trying to change the permission on filezilla but i get this error:
    500 ‘SITE CHMOD 644 BritaxcarSeat-140×130.jpg’: command not understood

  17. WPBeginner Staff says

    We hope you have already tried scanning your home computer for malware and viruses.

    Another thing you can try is to delete the .htaccess file from your website’ root directory. Make sure you download it as backup to your computer first before deleting it from your webserver.

    • Haruko Haruhara says

      Yeah, we did that; we tried deleting the .htaccess file. We tried changing the permissions, that didn’t work. We even have an old defunct WordPress.com site and are able to upload photos onto there just fine. Sigh ….

      Also, when we try to make a new post, the new post doesn’t fully load. It gets cut off halfway through.

      … we’re flummoxed. At this point, we don’t see an option but moving to a new host.

  18. Haruko Haruhara says

    I hope this will work.

    Our weird problem is we can’t upload images from our home computer, but the web host tech can upload them to our site, and we can upload images to our site ourselves from other computers. We’ve tried three different browsers on our home computer but get the HTTP error on all three browsers. It’s so frustrating and mysterious. We can’t figure out if its an ISP problem or a bad cookie. It’s been such a headache.

  19. JennaEmery says

    Uh, upon downloading FileZilla my antivirus is going NUTS! It keeps marking it as malware, spam, and a Trojan Horse. Is there perhaps an alternate program that won’t crash my computer?

  20. Emily says

    Hi,

    I followed these instructions, and now the images on my homepage arent visible as well as any new images I use on posts when I visit the website. Does anyone know how to undo everything I did and/or get it back to how it was?

    Thanks

  21. Vanessa Holden says

    I’m having trouble figuring out Filezilla. All of the fields are blank except for one, and I’ve no idea how to connect to my website using this FTP thing, and it’s SO frustrating. I’ve only ever had trouble with photos since WordPress revamped the New Post tab.

  22. Trey says

    I uploaded 18 pic files to my portfolio and they are all published to view on my website but when i view my site only 16 are showing up I can’t get the other 2 to display on my website. Can Someone help me with this please.

  23. Kristen says

    Thank you so much for this article! I’ve been pulling my hair out searching forums and articles and this fixed the problem perfectly!! I used 755 and it worked perfectly.

  24. Somnath says

    I did everything as per your instruction .I couldnt fix it .My images are still corrupting .What can be other issues?

  25. Junseok, Bae says

    I’m sorry for my poor English and I’m programmer+designer for 20years. From the 3.8~3.9, there’s big problem and it can not be solved by normal user because it is database problem(not the image.. or plug-in’s problem). Once some data was put into database, it can be revised only by manual method. WordPress is really good CMS and I love it. I think this problem may be the price of using.

  26. Julian says

    Thank you so much! My problem with the pictures was that. Now is fixed! The problem was permissions there were in the folders and files. Thank you!

  27. Alex says

    I found that Jetpack Photon was blocking some images from displaying. If you find that only certain images are not loading this could be the problem with 3.8 and 3.8.1

  28. chrys says

    Hi,

    I have an issue with uploading files but ONLY on media when I click add button. The drag and drop field has disappeared and when I click the add button nothing happens.
    Everywhere else in the site i can upload photo for feature image or insert image in a post. There I can go fetch the file on my computer.
    If I switch to default theme it’s back to normal.

    I have tried everything on this post and from other posts:
    disable plugins, rename plugin folder to make sure they wouldn’t interfere, changing permissions, download again WP 3.8.1, Download again theme etc.
    So I guess it’s a theme problem but the developer won’t help for now. What can i do??
    The more time is passing by, the more I need to publish on my site + I have comments to posts I don’t wanna loose if I restore my site to a previous date..

    Please anyone have an idea??

    Thanks

  29. Jim says

    I had a similar problem after migrating wordpress to a new server.
    In Plesk ‘Hosting Settings’ the default PHP installation was as an Apache Module. I switched to run as A FastCGI application and the uploads are working again without messing up the directory permissions because it runs as a User (with permissions)

    Since this isn’t something not always thought of, I thought I’d share.

  30. Arlene says

    I used to be able to upload images easily to posts and My Book Table–no problems. Then I stupidly upgraded to the newest version and can’t get the uploader link to work at all. I can change header and background but can’t upload anything from my MAC desktop as I need to do.

    I have no time for this and I have no patience with tech and am frustrated trying to find a solution that will not take all day–including downgrading my wp!

    Can’t somebody at wordpress fix this internernally or make a plugin to fix it and let us get on with our business? This is a waste of time.

  31. Steve says

    I downloaded Filezilla and Norton tells me it’s not safe and deletes it. I also found article about Filezilla malware. So I tried to use the cpanel file manager. It was already set to 755 and it would not allow me to make any changes. I’m not totally new to wordpress but far from a guru. I’ve already spent several hours on this issue and it’s very frustrating that there are no apparent fixes.

  32. Minki says

    I also tried the steps on here and they didn’t work, but after reading the comments, I tried 755 on the folder permissions and that seems to work.

    THANK YOU!

  33. James C. says

    Ok folks, I read your solution, tried it and it did not work. I upgraded to 3.8 and still have the same problem with images not uploading. However, I found something interesting. I used Filezilla to change permissions for the upload folder to 744 and 755 – neither worked. Then I found something strange. The permission change is not taking on the folder. Each time I go back to try something else, I noticed that the permissions on the upload folder goes back to 777 – even though I changed it and Filezilla says the changes were successful. Also, I can drag the images into the upload/2013/11 folder, but cannot drag into upload/2014/11 folder – the error msg on Filezilla says “critical file transfer error”. Plugins are: Nextgen gallery, Blackstudio TinyMCE Widget and Contact form 7. Your thoughts?

  34. Vijay Sharma says

    Thanks Balkhi and Everyone,

    this was the info I was looking for to fix the broken image links.
    Has anyone suggestions to stop SPAM from bot. Using CAPTCHA plugin has been denying my own log in to my own blog stating that you do not have access to this website!

  35. Arkhang says

    Ouch.

    It seems like this “744” method would never work on folders… actually, you need “execute” rights on a folder to be able to open it. If you can’t open, you can’t read any content.

    However, your article has put me on the right track, as I faced the same issue after a fresh 3.8 install. But I think maybe you should amend your article and replace 744 by 755 for folders.

    Next step, I wish to tell WordPress to create future folders for my pictures with correct rights. Hope htaccess will help me for that.

  36. Ahmed says

    HI there i upgraded my site to 3.8 wordpress and all the images display broken image i try to deactivate all the plugin and activating one by one nothing works.

    when i write new post is displays automatically my website default logo image although i inserted a image to the post when you view the post you can see the image but the main page it display default image this driving me crazy.

    i welcome if any one can help me to sort my problems about this broken images
    thanks

  37. IHR says

    Hello! I was delighted to come across this article as I was also experiencing the same problem, having just upgraded to WordPress 3.8. Every time I uploaded an image to the media library, it would say there was a broken link. Initially, I tried following your instructions but this did not solve the problem. However, I changed the directory permissions to 755 instead of 744 and this worked! There is no broken link anymore and the images are displaying correctly.

  38. Jeremy Smith says

    I also came across this post this morning, because a few days ago wordpress just stopped allowing me to upload images. it says it uploads, but then I just get the broken link icon, although all the info etc about the image is uploaded.

    So I followed all the instructions for changing file permissions, and still i have the problem. Someone at the office upgraded our wordpress to 3.7.1 and now I have upgraded it to 3.8 – could this be related to it?

    I am at a loss for what to do. Any suggestions most welcome. The site is at http://blog.wtmresponsibletourism.com

    Thanks

    Jeremy

    • WPBeginner Support says

      Jeremy,

      Try changing directory permissions to 755 instead of 744 and apply them recursively to directors only. Let us know if this works for you. Another thing you can try is disabling jetpack’s photon module. If this resolves your problem then contact jetpack’s support.

      Administrador

  39. Daniel Jiménez says

    I find your article very timely.

    I have a question

    few days ago, a couple of images of the slider of my blog suddenly stopped displayed on the homepage, in the gallery of images of wordpress just a gray box the picture looked, however the pictures were hosting.

    In the browser, put the path to the images and scored the server error saying it did not exist.

    The download via ftp and came back up, went back to mark the route of the images in the browser and ZAZ! there were back.

    Is it an error with the hosting?, I’ve been looking for information about the problem in order to keep me from ever happening again.

    I follow your blog for some time and I found it very useful, greetings.

  40. Mike says

    My heart jumped for joy when I first saw the title of this post. Alas what I need help on was sooo close to this, but I had already tried permissions. If anybody could help with the problem below I would be ever so grateful.

    I am using WordPress 3.7.1, Solostream WP-Clear 3.2.1 Theme, and WordPress “Regenerate Thumbnails” plugin 2.2.4. (http://wordpress.org/plugins/regenerate-thumbnails/) I am getting the following error on about 80% of the thumbnail images I try to regenerate.

    function (){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);”function”===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&”string”!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this}

    If you have seen this error, know how to fix, it or know of another way to regenerate thumbnails PLEASE respond ASAP.

Deixe uma resposta

Obrigado por deixar um comentário. Lembre-se de que todos os comentários são moderados de acordo com nossos política de comentários, e seu endereço de e-mail NÃO será publicado. NÃO use palavras-chave no campo do nome. Vamos ter uma conversa pessoal e significativa.