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 adicionar e alinhar imagens no editor de blocos do WordPress (Gutenberg)

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.

As imagens dão vida às suas postagens e páginas do WordPress, tornando-as mais atraentes. Entretanto, muitos iniciantes têm dificuldade em alinhar as imagens da maneira que desejam.

O novo editor de blocos do WordPress (Gutenberg) resolve esse problema, facilitando a adição e o alinhamento de imagens no WordPress.

Neste artigo, mostraremos como você pode adicionar e alinhar facilmente imagens no WordPress para criar belos layouts de conteúdo.

Adding and properly aligning images in WordPress

Alinhamento de imagens no editor do WordPress

Anteriormente, o WordPress usava uma área de texto com botões de edição como seu editor padrão. Um problema específico do antigo editor era o alinhamento de imagens. Pode ser difícil alinhar as coisas corretamente em seu site do WordPress.

Embora houvesse opções para alinhar as imagens à esquerda, à direita ou ao centro, elas nem sempre ficavam boas. Às vezes, as imagens não se alinhavam, não tinham o tamanho exato ou simplesmente pareciam estranhas.

O WordPress 5.0 introduziu um novo editor de posts do WordPress chamado editor de blocos Gutenberg. Ele corrigiu vários problemas do antigo editor, inclusive os problemas de alinhamento de imagens.

Vamos dar uma olhada em como você pode adicionar e alinhar imagens facilmente no novo editor para criar belos layouts para as postagens e páginas do seu blog WordPress.

Adicionar e alinhar imagens no WordPress

O editor vem com os seguintes blocos que você pode usar para adicionar imagens às suas postagens e páginas do WordPress.

  • Imagem
  • Imagem embutida
  • Galeria de imagens
  • Mídia e texto
  • Capa

Vamos começar com um bloco de imagem simples.

Clique no botão “Add new block” (Adicionar novo bloco) ou digite /image no editor de postagens para inserir um bloco de imagem.

Adding a new image block in WordPress post editor

Você verá três botões dentro do bloco de imagem em branco.

É possível carregar uma imagem do seu computador, selecionar uma imagem já carregada da biblioteca de mídia ou inserir uma imagem fornecendo o URL do arquivo de imagem.

Em seguida, clique no botão “Upload” e selecione a imagem que deseja carregar do seu computador.

Assim que você selecionar a imagem, o WordPress fará o upload dela para sua biblioteca de mídia e a inserirá no bloco de imagens.

Image alt text

Agora, você verá uma barra de ferramentas na parte superior da imagem e algumas configurações de bloco de imagem na coluna da direita.

Para alinhar sua imagem, você usará a barra de ferramentas que aparece na parte superior da imagem.

Image alignment buttons in WordPress post editor

O bloco de imagens oferece as seguintes opções de alinhamento de imagens como botões na barra de ferramentas.

  • Alinhar à esquerda
  • Alinhar ao centro
  • Alinhar à direita
  • Largura ampla
  • Largura total

Se sua imagem for menor em largura, alinhá-la à esquerda ou à direita exibirá o texto ao lado da imagem. Alinhando-a ao centro, a imagem será exibida em sua própria linha, sem texto em nenhum dos lados.

Center align an image in WordPress

A escolha da opção de largura ampla fará com que sua imagem seja mais larga do que a área de texto.

A opção de largura total a empurrará para as bordas direita e esquerda da tela do navegador.

Making an image full-width in WordPress

Como alinhar perfeitamente uma imagem ao lado do texto

Muitas vezes, você pode precisar alinhar perfeitamente uma imagem ao lado de um texto. O editor de blocos do WordPress facilita isso adicionando o bloco Media & Text.

Esse bloco basicamente adiciona uma área de duas colunas. Uma coluna para imagens (mídia) e a segunda coluna para conteúdo de texto.

Media and text block in WordPress post editor

Basta carregar sua imagem.

Em seguida, você pode adicionar o texto que deseja exibir ao lado dele.

Image and text block settings

Depois de adicionar a imagem e o texto, você verá mais opções para o bloco. Você pode tornar o bloco inteiro mais largo ou de largura total e também pode alternar os lados da imagem e do texto.

O alinhamento da imagem se ajustará automaticamente à altura do texto na próxima coluna.

Image size adjusts to align vertically

Como alinhar as imagens da galeria no WordPress

Oeditor de blocos do WordPress também vem com um bloco para adicionar galerias de imagens. Isso permite que você exiba facilmente imagens em uma grade de linhas e colunas.

O bloco Gallery vem com opções de alinhamento semelhantes na barra de ferramentas.

Você pode fazer com que todo o bloco da galeria seja alinhado à esquerda, ao centro ou à direita. Você também pode torná-lo largo ou alterá-lo para uma linha de largura total.

Align gallery images in WordPress post editor

O recurso de galeria padrão do WordPress é muito bom. No entanto, se você adiciona regularmente galerias de fotos às suas postagens e páginas do WordPress, considere usar um plug-in de galeria de fotos como o Envira Gallery.

Esses plug-ins lhe darão mais opções para alinhar imagens em suas galerias de fotos, exibi-las no pop-up e estilizá-las de forma diferente.

Como adicionar duas imagens lado a lado no WordPress

A maneira mais fácil de exibir duas imagens lado a lado em uma postagem do WordPress é adicionar as duas imagens em um bloco Gallery.

Display two images side by side in WordPress posts and pages

Basta selecionar um layout de duas colunas para o bloco da galeria para exibir as duas imagens uma ao lado da outra. Você também pode marcar a opção “crop thumbnail” (cortar miniatura) para garantir que as duas imagens tenham o mesmo tamanho.

Mais maneiras de adicionar e alinhar imagens no WordPress

Além da imagem, da mídia e do texto e do bloco da galeria, você também pode usar o bloco Cover para adicionar uma imagem de capa.

No design moderno da Web, as imagens de capa são usadas para criar layouts de conteúdo altamente envolventes. Essas imagens são usadas para destacar diferentes seções de uma página.

O bloco de imagem de capa vem com as mesmas opções de alinhamento de um bloco de imagem. Você pode adicionar texto sobre a imagem e escolher uma cor de sobreposição nas configurações do bloco. A melhor parte é que você pode marcar a opção “Fundo fixo”, que cria um efeito de fundo de paralaxe.

Cover image in WordPress

Para saber mais sobre o uso de imagens de capa, confira nosso artigo sobre a diferença entre imagens em destaque e imagem de capa no WordPress.

Até agora, falamos sobre como adicionar imagens diretamente a seus posts e páginas. E quanto às imagens de sites de terceiros?

O editor de blocos também facilita isso. Você pode adicionar imagens de sites populares de compartilhamento social, incluindo Instagram, Facebook, Flickr, Imgur, Photobucket e outros.

Por exemplo, se você quiser adicionar uma foto do Instagram, basta adicionar o bloco do Instagram ao editor de postagens e inserir o URL da postagem que deseja compartilhar.

Instagram embed in WordPress

Depois, basta clicar no alinhamento desejado na barra de ferramentas. Os blocos de incorporação também permitem incorporar facilmente vídeos no WordPress.

Para obter mais detalhes, consulte nosso guia sobre como incorporar o Instagram no WordPress.

Esperamos que este artigo tenha ajudado você a aprender como adicionar e alinhar imagens facilmente no editor de blocos do WordPress. Talvez você também queira ver nosso guia sobre como otimizar imagens para acelerar o WordPress e o melhor software de design.

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

64 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. Jiří Vaněk says

    Gutenberg is still a big unknown for me. I’ll admit that I only started discovering it after WordPress 6.4 arrived and reading these pages. For a long time, for example, I could not figure out how to place an image and text next to each other (in Elementor it was a completely simple matter). After reading this article, I can do a little more with Gutenberg. Thanks for that.

  3. fred dugas says

    will this work with Iframes? I edit a custom HTML block and add iframe and the save and the add is lining up all the way to the left where all the other blocks are centered.?

    • WPBeginner Support says

      It would depend on the iframe but normally iframes will not automatically have alignment options.

      Administrador

  4. Harry Goldhagen says

    How do you align Featured Images that appear on the automatically generated Blog page and Category page? Clicking on the image opens the post, and there doesn’t seem to be an alignment setting for Featured image when filling in the post settings.

    • WPBeginner Support says

      For the featured image, that would be determined by your theme. If you check with your specific theme’s support they should be able to assist with the alignment of your featured image.

      Administrador

    • WPBeginner Support says

      Unless your theme has a specific setting for it, most themes should have the text uniform if it is all the image caption and not a different text block.

      Administrador

  5. Sharon says

    I’m wanting to change the default for uploading an image to be centred every time. To change each image I upload to centre each time I add an image is so time consuming. Can I change the default to centre?

    • WPBeginner Support says

      There is not a simple method we would recommend for beginners at the moment but we will keep an eye out for something we would recommend.

      Administrador

  6. Amanda A. says

    I am trying to use the Block Editor to display two images side by side. I used the two column feature then image blocks in each column. While designing, it displays correctly, but when I “preview in new tab”, the side by side columns are gone and the images are stacked. What am I doing wrong? Is this a common issue? How can I fix this?

    • WPBeginner Support says

      You may want to ensure the images aren’t too large for them to be side by side in your specific theme for the most common reason for that issue.

      Administrador

  7. Sheryl Zeiset says

    I’m trying to learn how to use the new block editor. When I click on the Add block button and choose image to add a photo, I only get the ‘insert from URL’ option and I can’t find a way to add photos from my Media Library. Can you help?

    • WPBeginner Support says

      You would want to check closely to find the text next to the upload button for selecting the image from your media library

      Administrador

  8. Luther Mckinnon says

    I have been publishing a blog for many years. I have learned to dread the introduction of a new system. Doing a simple thing like adding photographs is now very difficult.

  9. Ward says

    Great information, problem is that back end it works but front end it always aligns to the left. Would it be possible that this has something to do with my Elementor template?

    • WPBeginner Support says

      If you are using a page builder there is a chance that your page builder is overriding the styling and you can reach out to your builder’s support for assistance.

      Administrador

  10. Louie Adem says

    just started WordPress yesterday. Totally a beginner and so happy wpbeginner provided me the “trainer wheels” to jumpstart. The education in this website is so valuable. Can’t thank you enough.

  11. BadlyDrawmWolf says

    Thank you for this little gold nugget – really struggling getting in to the “new” way of handling my blog and almost giving up and searching for other alternatives…. :)

  12. Karen says

    You mention “Inline Image”, but I don’t see any such block. Your article was written awhile ago but supposedly updated in Jan. 2020 – did that block go away and you forgot to remove it from this article? Or a better question: How can I add an inline image within another block like Paragraph or Heading?

    • WPBeginner Support says

      The inline image block is not currently available but you can normally recreate the formatting with the text and image or the standard image block

      Administrador

  13. Ted Strutz says

    When I add an image from my media the image toolbar does not come up to align left or right. I can change size of image.

    • WPBeginner Support says

      You would want to ensure you have not set it to be at the top of the page instead of how we have it at the moment.

      Administrador

  14. Hannah says

    Hello, I have aligned all images using the block editor and everything looks fine until I preview?

    Then some images have become far bigger than the others, I have a gallery of two images suddenly sitting on top of a single image. Everything has moved around randomly!

    Even when I published it, it was still all wrong. I would love your help, thank you!

    • WPBeginner Support says

      You would want to reach out to your theme’s support to ensure there isn’t a styling conflict, otherwise, you could try disabling your plugins to see if this is a plugin conflict as well.

      Administrador

  15. Harry says

    Hi, I’m looking to align shortcodes next to one another like you describe with the images is this possible? Many Thanks

  16. Ap says

    Hello,
    How do you arrange the positioning of the title for the cover blocks?

    You have that option in your bar, but for some reason, when I click on cover block, there is no text alignment option.

    Any ideas on this?

    Thank you for the great article.

    • WPBeginner Support says

      You would want to check the top of your page as that would be the other location the alignment options would be rather than floating over the element

      Administrador

  17. Cheryl says

    How do you make an image clickable with a clickable link? I’ve been looking for tutorials and they all seemed based on a prior Gutenberg block which since has changed an the tutorials no longer match the block.

    • WPBeginner Support says

      You would want to check the top toolbar for the current location for where to add a link to an image

      Administrador

  18. Alejandro says

    Hello, Is it possible to write an image caption right below the image when using the “Media & Text block”?

  19. Pete Newman says

    There is an existing issue of incompatability between Gutenberg and themes. Do you have a list of themes that are compatable with Gutenberg (and that allow full functionality of Gutenberg)?
    Thanks and regards,
    Pete.

  20. Pete Newman says

    I have been using wordpress for years but have been a bit absent lately. Gutenberg is a headspin. I follow these instructions but simply cannot align images in an image/text block. When I go to preview the image is aligned extreme hard left of the page with no margin at all. Any solutuions on offer?
    Thanks!!

    • WPBeginner Support says

      If each image needs its own link then setting up columns would likely be what you’re looking to do :)

      Administrador

    • WPBeginner Support says

      If you want to add multiple images in the same area, you would want to take a look at the gallery block to add multiple images in one section

      Administrador

    • WPBeginner Support says

      You could disable the visual editor under Users>Your Profile but that would prevent you from using the visual editor for other sections.

      Administrador

  21. Alice says

    I’m centering all of my images correctly in the editor, but they are all showing up as left-aligned in preview and live posts no matter what. Do you know what might be causing this? It’s driving me so crazy!

    • WPBeginner Support says

      Your theme may be overriding the styling you are setting. If you reach out to your theme’s support they should be able to assist.

      Administrador

  22. Anne says

    I would like to have an image next to a file (pdf) – all on the same line. Can I do that in one block, or would I need to create two? Thank you!

    • WPBeginner Support says

      You would want to add the column block to split the content and allow you to display the content like that.

      Administrador

  23. Suzy Algar says

    I am having creating captions for images and downloads that appear in my files. I don’t know where to go once I have the image in my files.

    • WPBeginner Support says

      If you’re trying to add the image to a post or page you would normally add an image block and then select the file you want to use in the block

      Administrador

  24. Roxana Safipour says

    So now how do you do “no alignment”, where the image is on the left and has no text wrapping around it? This used to be easy with the no alignment option, which is now gone. Please bring this back! I am going crazy trying to figure out how to get my image on the left (not centered) and with no text next to it, but the text keeps wrapping around it automatically!

    • WPBeginner Support says

      For what it sounds like you’re wanting, if you don’t specifically set the alignment for an image, the image should set itself that way.

      Administrador

      • Ben says

        Just a quick followup on this, as it was annoying me as well. There’s a simple answer but it’s sort of not that obvious as I was looking for a setting – just press the selected alignment button again to turn off the alignment and revert to the default no alignment.

  25. Jesse says

    Great post very useful.I have ugrade to wordpres 5.1 but now have problem with linking image to url. Can you help me?

    • WPBeginner Support says

      If you’re using the block editor, in the image block’s settings there should be a Link Settings section for you to set where an image links to.

      Administrador

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.