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 criar uma galeria 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.

Deseja criar uma galeria de imagens no WordPress?

Uma galeria de imagens permite que você adicione fotos em linhas e colunas. Isso permite exibir mais fotos em menos espaço e, ao mesmo tempo, facilita a navegação dos usuários.

Neste artigo, mostraremos como criar facilmente uma galeria de imagens no WordPress que deixa suas fotos ainda mais bonitas.

How to create an image gallery in WordPress

Por que criar uma galeria de imagens no WordPress?

Com o WordPress, é muito fácil adicionar uma imagem aos posts e páginas do seu blog. Você só precisa adicionar o bloco Image (Imagem) e carregar a imagem.

No entanto, se você estiver adicionando várias imagens ao seu site WordPress, todas essas imagens aparecerão uma após a outra. Isso não tem uma boa aparência e os usuários terão que rolar muito a tela para ver todas elas.

Images added with the Image block

Ao criar uma galeria, você pode exibir imagens em um layout de grade com colunas e linhas. É possível exibir miniaturas das fotos e os usuários podem clicar nelas para ver a imagem completa.

Dessa forma, você poderá mostrar mais fotos em menos espaço e terá uma aparência muito mais profissional.

Por exemplo, se você estiver criando um site de fotografia para exibir suas imagens, adicionar uma galeria de fotos permitirá que você exiba seu trabalho de forma esteticamente agradável.

Image gallery preview

Com o WordPress, você pode criar facilmente uma galeria de imagens usando o bloco Gallery no editor de blocos Gutenberg.

Você também pode usar os plug-ins de galeria do WordPress para criar galerias ainda melhores com mais recursos.

Dito isso, vamos ver como criar facilmente uma galeria de imagens no WordPress.

Para este tutorial, mostraremos dois métodos para criar uma galeria, e você pode usar os links abaixo para ir para o método de sua escolha:

Se você deseja criar uma galeria de imagens usando o editor de blocos do WordPress, esse método é para você. No entanto, lembre-se de que esse recurso é muito básico e não tem muitas opções.

Primeiro, você precisa abrir uma postagem/página nova ou existente na qual deseja criar a galeria na barra lateral de administração do WordPress.

Quando estiver lá, basta clicar no botão “+” no canto superior esquerdo da tela. A partir daí, localize e adicione o bloco Gallery à página ou postagem.

Depois de fazer isso, clique no botão “Upload” para carregar novos arquivos de imagem do seu computador.

No entanto, se quiser fazer upload de imagens da biblioteca de mídia, clique no botão “Biblioteca de mídia”.

Upload images for the gallery

Se você clicar no botão “Upload”, geralmente poderá carregar uma foto do computador por vez.

No entanto, você pode selecionar e abrir várias imagens com a tecla Ctrl pressionada no teclado.

Upload images from the computer

Depois de carregar todas as imagens, você pode adicionar legendas a elas clicando no ícone “Add Caption” (Adicionar legenda) na barra de ferramentas de blocos na parte superior das imagens individuais.

Você também pode adicionar texto alternativo às imagens no painel de blocos à direita.

Add caption for the uploaded image

Se você selecionar o botão “Media Library”, poderá escolher várias imagens para sua galeria de uma só vez.

Ao selecionar imagens, você também pode inserir o texto alternativo, o título e a legenda da imagem no painel de detalhes do anexo no lado direito.

Depois de adicionar todas as imagens, basta clicar no botão “Create a new gallery” (Criar uma nova galeria).

Add images for the gallery from the media library

Isso o direcionará para a página “Edit Gallery” no prompt da biblioteca de mídia.

A partir daí, você pode selecionar imagens individuais e adicionar uma legenda, título, descrição ou texto alternativo a elas.

Quando terminar, basta clicar no botão “Insert Gallery” (Inserir galeria) no canto inferior direito.

Add captions in the Edit gallery page

A galeria de imagens que você criou agora será adicionada ao editor do WordPress.

Você também pode personalizá-lo ainda mais selecionando o bloco Gallery e definindo suas configurações no painel de blocos à direita.

Por exemplo, você pode usar o controle deslizante “Columns” (Colunas) para decidir o número de colunas e linhas de suas galerias.

Você pode até mesmo alternar o botão “Crop Image” para cortar as miniaturas para melhor alinhamento.

Configure gallery settings in the block panel

Nas opções “Link to” (Vincular a), você pode escolher None (Nenhum) se quiser que seus usuários apenas visualizem sua foto. Essa opção desativa o recurso de clique para suas imagens.

No entanto, se você selecionar a opção “Arquivo de mídia”, as imagens serão clicáveis e o arquivo de imagem será aberto quando clicado. Da mesma forma, a página de anexos será aberta se você selecionar a opção “Attachment Page” (Página de anexos).

Quando estiver satisfeito com as configurações, clique no botão “Publish” (Publicar) ou “Update” (Atualizar) na parte superior para armazenar suas configurações.

Por fim, você pode visitar seu blog do WordPress para ver a galeria de imagens em ação.

Image gallery preview

Agora você criou facilmente uma galeria de imagens para o seu site. No entanto, você logo perceberá que ela não tem alguns recursos essenciais.

Por exemplo, suas imagens não poderão ser clicadas ou serão abertas em uma nova página. Se você vincular as imagens da galeria ao arquivo de mídia ou à página de anexo, os usuários terão que clicar no botão Voltar para visualizar a galeria novamente.

Isso não é fácil de usar e pode desestimular os usuários a explorar mais o seu site.

Da mesma forma, a aparência da galeria também depende do tema do WordPress que você está usando.

Além disso, não é possível organizar suas galerias em álbuns, tópicos, tags e muito mais. Sua galeria não é armazenada em nenhum lugar e, se você precisar adicionar a mesma galeria novamente, terá que recriá-la.

Se você quiser adicionar galerias de imagens com aparência mais profissional ao seu site, use o próximo método.

Se você deseja criar uma galeria de imagens mais funcional e esteticamente agradável para o seu site WordPress, este método é para você.

Usaremos o plugin Envira Gallery, pois ele é o melhor plugin de galeria de imagens do WordPress no mercado.

O Envira permite que você crie facilmente galerias de imagens totalmente responsivas, bonitas e modernas no WordPress. Ele é super rápido e vem com muitos recursos, como pop-up de lightbox, navegação fácil por imagens, construtor de arrastar e soltar e modelos de galerias profissionais.

Primeiro, você precisa instalar e ativar o plug-in Envira Gallery. Para obter mais detalhes, consulte nosso guia passo a passo sobre como instalar um plug-in do WordPress.

Após a ativação, vá até a página Envira Gallery ” Settings (Configurações ) no painel do WordPress para inserir sua chave de licença.

Você pode obter essa chave em sua conta no site da Envira Gallery.

Observação: o Envira Gallery também tem um plug-in gratuito que você pode usar. No entanto, usaremos a versão profissional neste tutorial para desbloquear mais recursos.

Add the Envira Gallery license key

Depois de verificar sua chave de licença, você pode ir para a página Envira Gallery ” Add New na barra lateral do WordPress para começar a criar sua primeira galeria.

Quando estiver lá, forneça um título para sua galeria e clique no botão “Select files from computer” (Selecionar arquivos do computador) para carregar suas imagens.

Creating a New Gallery with Envira Gallery WordPress Plugin

Você também pode carregar imagens da biblioteca de mídia do WordPress clicando no botão “Select files from other sources” (Selecionar arquivos de outras fontes).

Lembre-se de que, se você usar essa opção, só poderá carregar uma única imagem por vez da biblioteca de mídia.

Depois de carregar as imagens, role para baixo até a seção “Gallery” (Galeria), onde todas as suas fotos serão exibidas.

Images in Envira Gallery Builder

Em seguida, você pode clicar no ícone de lápis na parte superior de cada imagem para abrir o prompt “Edit Metadata” (Editar metadados) na tela.

A partir daqui, você poderá adicionar a legenda, o status, o título e o texto alternativo para imagens individuais.

Quando terminar, não se esqueça de clicar no botão “Save Metadata” (Salvar metadados) para salvar as legendas das imagens.

Edit Gallery Image Metadata

Em seguida, você precisa clicar na guia “Configuration” (Configuração) na barra lateral à esquerda.

A partir daí, você pode alterar o layout da galeria, inclusive o número de colunas, o carregamento lento da imagem, o tamanho da imagem, o posicionamento do título e da legenda, as margens, as alturas, os tamanhos das miniaturas, as dimensões da imagem e muito mais.

Edit gallery configuration settings

Depois disso, vá para a guia “Lightbox” na barra lateral esquerda e marque a opção “Enable Lightbox” (Ativar Lightbox).

Essa opção agora permitirá que os usuários ampliem as imagens e naveguem por elas sem sair da página.

Você pode deixar as outras configurações padrão como estão, pois elas funcionam muito bem para a maioria dos sites, mas pode revisar as opções e alterá-las, se desejar.

Enable the lightbox

Em seguida, clique na guia “Mobile” para definir as configurações de sua galeria para dispositivos móveis.

A partir daí, você pode escolher as dimensões da imagem para dispositivos móveis, ativar ou desativar o Lightbox, ativar/desativar as legendas das imagens e muito mais.

Configure settings for gallery

Depois disso, você pode revisar mais opções, como o slug da galeria e a adição de CSS personalizado na seção “Misc”.

Quando estiver satisfeito com suas configurações, basta clicar no botão “Publish” (Publicar) na parte superior para armazenar suas alterações.

Miscellaneous gallery settings

Em seguida, você precisa abrir um post ou uma página na qual deseja incorporar sua galeria.

Quando estiver lá, clique no botão “+” no canto superior esquerdo da tela para abrir o menu de blocos.

Em seguida, basta localizar e adicionar o bloco da Galeria Envira à página ou postagem.

Add the Envira gallery block

Depois de fazer isso, você precisa adicionar sua galeria de imagens no menu suspenso do bloco Envira Gallery.

Por fim, clique no botão “Update” (Atualizar) ou “Publish” (Publicar) na parte superior para salvar suas alterações.

Agora, você pode visualizar sua galeria de imagens no site do WordPress.

WordPress Photo Gallery Created with Envira Gallery

Aqui, você perceberá que, ao clicar em qualquer imagem da galeria, ela será aberta em tamanho real com o efeito lightbox.

Também é possível navegar pelas imagens nesse pop-up pressionando as teclas de seta para a esquerda e para a direita na tela ou no teclado.

Envira Gallery Image in the Lightbox Popup

Bônus: otimize as imagens da galeria para os mecanismos de pesquisa

É importante otimizar todas as imagens da sua galeria sem perder a qualidade da Web, para que os mecanismos de pesquisa possam indexá-las com as palavras-chave corretas.

Isso pode ajudar a aumentar a velocidade de carregamento da página, melhorar a experiência do usuário, aumentar os compartilhamentos nas mídias sociais e trazer tráfego orgânico para o seu site.

Você pode otimizar facilmente as imagens da sua galeria sempre adicionando texto alternativo a elas na página de detalhes do anexo. Essa descrição é mostrada aos rastreadores dos mecanismos de pesquisa e ajuda suas galerias de imagens a se classificarem melhor.

Add alt text with all your images

Além disso, você também pode usar o All in One SEO, que é o melhor plugin de SEO para WordPress do mercado.

Ele vem com um complemento Image SEO que definirá automaticamente seu texto alternativo, títulos de imagem, legendas e muito mais. Ele também adicionará um mapa do site de imagens adequado e outros recursos de SEO para melhorar sua classificação de SEO.

Para obter mais informações, consulte nossa análise do AIOSEO.

All in One SEO website

Além disso, você também deve usar nomes de arquivos descritivos para suas imagens, usar palavras-chave relevantes e compartilhar suas galerias nas mídias sociais. Para obter mais dicas, consulte nosso guia para iniciantes sobre como otimizar imagens para mecanismos de pesquisa.

Esperamos que este artigo tenha ajudado você a aprender como criar uma galeria de imagens no WordPress. Talvez você também queira ver nossa comparação entre WebP vs. PNG vs. JPEG: o melhor formato de imagem para o WordPress e nossas escolhas de especialistas dos melhores plug-ins do WordPress para gerenciar imagens.

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

147 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. Chris says

    I just started using standard wordpress image galleries. When I add images to the gallery, if I do not have enough images to fill an entire row, the last row’s image is displayed at a size that allows the image to fill the full width of the container. So the default of 3 images per row applies until the row runs out of images, then I get a final row with a giant image. Is there a way to force every image to the same size so that the gallery just has all images the same size, regardless of whether the row it appears in is full?

    • WPBeginner Support says

      For that, you would want all of your images uploaded to be the same size and then you would uncheck the crop images checkbox that forces your images to align.

      Administrador

  3. Roger Novak says

    Can separate clickable links be attached/embedded to each picture in a gallery that will take the viewer to another web site?

    • WPBeginner Support says

      It is a page that specifically shows your media item with your theme’s styling to include the header and footer of your site.

      Administrador

  4. To the Aisle Australia says

    Hi! Great info here – we are still having no luck centreing our gallery – despite clicking centre in both wordpress and elementor post editor… any suggestions would be greatly appreciated!

    • WPBeginner Support says

      If you are using Elementor and the settings are being ignored, you would want to reach out to Elementor’s support and they would be able to assist.

      Administrador

  5. Matthew Busse says

    I found this very difficult to follow, my WordPress is set up very different. The date at the top says Jan 2020, but there are comments from 2016? When was this created? Since the date at the top said January 2020 *(and it’s now June 2020), I thought this would still represent the current WordPress, but it doesn’t. So this is just very confusing…

    • WPBeginner Support says

      This guide was updated for it to work with the block editor. If your admin area looks different, you may be using WordPress.com.

      Administrador

  6. Nilla says

    Great tutorial. However, you don’t advise worpress.com users that you need to be on a Business Plan to install plugins, which is extremely annoying.

  7. Brent says

    Hello, thank you for the post. I have a gallery I built in Elementor. How can I allow my client access to upload and delete photos from the gallery page?

    • WPBeginner Support says

      You would want to reach out to Elementor’s support with what you are wanting to do for them to be able to assist you.

      Administrador

  8. Tegah says

    Please How can i create featured image gallery in new wordpress.

    i.e i what my featured image post to be made up of multiple images like a gallery

    • WPBeginner Support says

      If your theme does not offer that ability by default, you would need to use a plugin like the one we recommend in this article :)

      Administrador

  9. Stacey Barrett says

    Is there an easy way to make all photos in the gallery the same size so it looks uniform? I’m creating the gallery for a non-profit newsletter.

    Thank you, stacey

    • WPBeginner Support says

      With the default gallery as long as you enabled the crop images they should be uniform in size.

      Administrador

  10. Jaco says

    Hi I understood all that and thank you very much. so can you give me an idea how I can make a gallery appear by clicking on a photo.?
    I want when some one click on a photo and then the gallery will appear.
    with worpress
    Help me please

    • WPBeginner Support says

      For what it sounds like you’re wanting, you may want to take a look at Envira Gallery and the album feature

      Administrador

  11. Robert says

    Thanks for putting this amazing piece of content together! I ended up using the a gallery plugin because it was super easy to set up :)

  12. Wendy says

    Hi, I have been managing a gallery on my site for years, but am only realizing now that it seems as though WP will only allow me to share 100 photos at a time. Is there a way to display more? I have a Premium plan.
    Thanks!

  13. Alison says

    Thank you for this helpful article. I make galleries all the time on my desktop computer, but I am hoping to blog from the trail this summer while backpacking the Colorado Trail and will be using my phone to do so. Is there any way to create galleries using the WordPress mobile app? I have been experimenting with that and can’t seem to figure out how to do so.
    Thank you!

  14. Dave Maynard says

    I’m using th wordpress gallery creator. When I create a gallery with 3 columns in 2 rows of pictures, it looks good. But when I click on Preview, it shows me what my webpage will look like but it has the pictures all on top of one another and not in the 3 columns & 2 rows like I wanted.
    How can I repair this?

  15. Craig Langburne says

    How can I display a single image and link it to a slide show in a new window?
    – I don’t want 12 thumbnails on the page – just one image the says ‘See the gallery’

  16. Steven says

    Yes!! Great tutorial! This saves me from having to revert to site origin builder when I have already used the reular wordpress editor. Works really well. I wish I would have realized this a long time ago but never reseached it. Thanks for this info.

    Steven

  17. Kyle says

    Can I great a photo gallery that automatically transitions between 5-10 images automatically once my page has been loaded? I was also hoping to embed this on my homepage. Any help would be great. Thanks.

  18. Erin says

    Hi!

    I am trying to add an image gallery that has links to various external pages (i.e. you click on an image and it brings you to that website.) I have determined that this is difficult to do with the WP gallery because they want all the images to go to the same linked page, but I want each of my images to go to a different page. It seems envira is not free. I downloaded gridplus and gridable but am still struggling with how to do this. ideas??

  19. Sarah says

    Hi there! I’m trying to figure out my gallery in WordPress, but when I publish it shows in one single column, but the backend looks normal and how I want. Do you know how to fix this?

  20. Robin Pacific says

    HI — I’m trying to update my site and have created a new gallery, but I can’t figure out if I did it in WP or NextGen. I can’t see how to insert it into the project.
    I have inserted a video successfully. Can I have a video (on Vimeo) and also a gallery?

    thanks,
    Robin

  21. loretta says

    great tutorial thanks!
    My blogs show as individual thimble images on the front blog page. If you hover over image you see the title. My issue is when you click on my blog page it looks like I have nil blogs as it takes up to 20 seconds for all images to show. Can you have the blogs list as titles rather images? If i hide featured image the boxed appear blank which is worse.
    Many Thanks
    Loretta

  22. Ali says

    I have a website I want to add gallery to my website.. This gallery will hold GBs of data more than 100GB. Is there any limitation in wordpress for that?

  23. Vicki Bentley says

    If I create a gallery, can I then add more photos to the same gallery and somehow update the gallery post page? (I’m posting recipes of food dishes, and as I complete more of them, will want to update the post.)

  24. Vicki Bentley says

    If I create a gallery using the default WP functionality, but decide later that I’d like to upgrade to more functionality with something you’ve mentioned, can I simply add the plug-in and have it all convert, or will I have to rebuild the gallery from scratch?

  25. Howard Mkongo says

    Loved the tutorial. Was a stepping stone to creating a custom plugin. After a few tweaks…problem solved

  26. Sayan Das says

    Thank you Wpbeginner,
    I am a regular visitor of your site for my new blog.
    Whenever I facing any problem for my new blog, I directly open your blog.
    Thanks again and keep sharing.

  27. Komal Kim Kevin says

    You guys are the bomb! Thank you so much for this easy “WP for Dummies” sort of post! Keep it up!!!

  28. Sandy Little says

    I have been playing with an image gallery. Once I make the gallery, can I somehow make each image clickable in order to direct people to my posts?

    • Anita says

      Thanks! I look forward to trying out this plugin.

      Can you recommend a plugin that will let me create a gallery of featured images from my posts, by post category? I want users to be able to click the image to view the related post. Thanks!

  29. Tamara Groom says

    Your plugin is a life-saver. I am unable to connect to Jetpack because of a issue with the client’s host and the other lightbox plugins I tried weren’t great. WPBeginner always has an answer, thanks for all you do!

  30. Martha says

    The gallery seems to default to three images across in my posts, is there any way I could have 4 or 5 images running across in each line?

  31. William Fitch says

    Thanks for an on-the-button explanation of the gallery. I must’ve tried a dozen other posts, which were all over the place, before I found this one.

    I have a question. Is it possible to bunch the images in a gallery closer together. I’ve tried all sorts and my images remain far apart

  32. Avinesh Shakya says

    How can i display the the images of the gallery along with caption.

    I want caption of each image in gallery to be stored in variable

  33. Jacques says

    Why are there no spaces between the images on my page and in the beginning of your tutorial you mention a lightbox but you never get to explaining how to make it as you only cover the carousel part.

    Where can I find this and how can I get the spaced grid option??

  34. Gennie says

    So does things like social media activity now count for SEO?
    I was told they help because of the Panda Google algorithm refresh
    Added to Digg, someone will like it

  35. Arabella says

    How do you delete images from a gallery? I have tried every single thing I can possibly think of and followed all the advice given on the internet, but the images are still there on my home page, even though I have deleted them multiple times from the actual gallery. There are no problems with the Media Library, just the gallery that appears on my home page. If anyone can tell me how to get rid of these pictures, that would be greatly appreciated.

  36. Craig Swank says

    I have created several image galleries which are initially uploaded in alphabetical order – I need to add large groups of additional images from time to time (this is in Word Press dot Com) – Is there anyway to re-alphabetize the entire gallery without being required to “drag and drop” – When adding 100’s of new images that is not an option.

    Thanks

  37. John Byrne Barry says

    I just discovered this after trying some plug-ins, but the problem I’m trying to address is the same, with this and with the various plugins. Which is how to add a link to the image, so when you click on the image, it takes you to a specific page. Not the media file. Any suggestions? Thanks.

  38. Freddie says

    I feel really stupid but just created a gallery page….updated with photos and text….simple enough. Why does “image gallery”, “slide show” and all this other stuff show up at the bottom of the page? I cannot figure out how to delete it. newby at web design.

  39. melanie bund says

    HI, Would be helpful to alot of people if you also suggested a free gallery plugin, rather than advertise a paid plugin
    Melanie

    • Collin says

      You should have kept reading. They do offer a pretty cool free plugin to add to the existing WP gallery. A nice looking carousel. Did you see?

  40. Miguel Garcia says

    Thank you very much for the tutorial.

    I have just one question.

    I created the gallery and published it, but when i put the mouse over the picture, it show a red square with two small silver squares that says: “view attachment page’ and “view in full size”

    How can i remove it? I wanna make it like in facebook, that you just put the mouse over, click and see the carousel.

    Is that possible?

  41. Jeff Brown says

    I did what you suggest above to create a simple gallery on a webpage. It shows up beautifully. However whenever I click on one of the thumb nail images it says : “image cannot be loaded. Make sure path is correct and image exist”.

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.