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

Come aggiungere e allineare le immagini nell’editor di blocchi di WordPress (Gutenberg)

Nota editoriale: guadagniamo una commissione dai link dei partner su WPBeginner. Le commissioni non influenzano le opinioni o le valutazioni dei nostri redattori. Per saperne di più su Processo editoriale.

Le immagini danno vita ai post e alle pagine di WordPress rendendoli più accattivanti. Tuttavia, molti principianti hanno difficoltà ad allineare le immagini nel modo che preferiscono.

Il nuovo editor di blocchi di WordPress (Gutenberg) risolve questo problema rendendo più semplice l’aggiunta e l’allineamento delle immagini in WordPress.

In questo articolo vi mostreremo come potete aggiungere e allineare facilmente le immagini in WordPress per creare bellissimi layout di contenuto.

Adding and properly aligning images in WordPress

Allineamento delle immagini nell’editor di WordPress

In precedenza, WordPress utilizzava come editor predefinito un’area di testo con pulsanti di modifica. Un problema particolare del vecchio editor era l’allineamento delle immagini. Poteva essere difficile allineare correttamente le immagini sul vostro sito web WordPress.

Anche se c’erano opzioni per allineare le immagini a sinistra, a destra o al centro, non sempre si vedevano bene. A volte le immagini non si allineavano, non avevano le dimensioni esatte o semplicemente avevano un aspetto strano.

WordPress 5.0 ha introdotto un nuovo editor di post di WordPress chiamato editor di blocchi Gutenberg. Ha risolto diversi problemi con il vecchio editor, tra cui quello dell’allineamento delle immagini.

Vediamo come aggiungere e allineare facilmente le immagini nel nuovo editor per creare bellissimi layout per i post e le pagine del vostro blog WordPress.

Aggiungere e allineare le immagini in WordPress

L’editor è dotato dei seguenti blocchi che possono essere utilizzati per aggiungere immagini ai post e alle pagine di WordPress.

  • Immagine
  • Immagine in linea
  • Galleria
  • Media e testo
  • Copertina

Cominciamo con un semplice blocco immagine.

Fare clic sul pulsante “Aggiungi nuovo blocco” o digitare /image nell’editor del post per inserire un blocco immagine.

Adding a new image block in WordPress post editor

Si vedranno tre pulsanti all’interno del blocco immagine vuoto.

È possibile caricare un’immagine dal computer, selezionare un’immagine già caricata dalla libreria multimediale o inserire un’immagine fornendo l’URL del file.

Quindi, fare clic sul pulsante “Carica” e selezionare l’immagine che si desidera caricare dal computer.

Non appena si seleziona l’immagine, WordPress la carica nella libreria multimediale e la inserisce nel blocco immagine.

Image alt text

A questo punto, si noterà una barra degli strumenti sopra l’immagine e alcune impostazioni del blocco immagine nella colonna di destra.

Per allineare l’immagine, si utilizzerà la barra degli strumenti che appare in cima all’immagine.

Image alignment buttons in WordPress post editor

Il blocco immagine offre le seguenti opzioni di allineamento dell’immagine come pulsanti nella barra degli strumenti.

  • Allinea a sinistra
  • Allinea al centro
  • Allinea a destra
  • Ampia larghezza
  • Larghezza piena

Se l’immagine è più piccola in larghezza, l’allineamento a sinistra o a destra farà apparire il testo accanto all’immagine. Allineandola al centro, l’immagine verrà visualizzata sulla propria riga senza testo ai lati.

Center align an image in WordPress

Scegliendo l’opzione di larghezza ampia, l’immagine sarà più larga dell’area di testo.

L’opzione a tutta larghezza lo spingerà ai bordi destro e sinistro dello schermo del browser.

Making an image full-width in WordPress

Come allineare perfettamente un’immagine accanto al testo

Spesso è necessario allineare perfettamente un’immagine accanto a un testo. L’editor di blocchi di WordPress facilita questo compito aggiungendo il blocco Media e testo.

Questo blocco aggiunge fondamentalmente un’area a due colonne. Una colonna per le immagini (media) e la seconda colonna per il contenuto testuale.

Media and text block in WordPress post editor

È sufficiente caricare l’immagine.

Quindi, è possibile aggiungere il testo che si desidera visualizzare accanto ad esso.

Image and text block settings

Dopo aver aggiunto l’immagine e il testo, si noteranno altre opzioni per il blocco. È possibile rendere l’intero blocco più largo o a tutta larghezza, nonché cambiare i lati dell’immagine e del testo.

L’allineamento dell’immagine si adatta automaticamente all’altezza del testo della colonna successiva.

Image size adjusts to align vertically

Come allineare le immagini della galleria in WordPress

L’editor di blocchi di WordPress dispone anche di un blocco per aggiungere gallerie di immagini. Questo permette di visualizzare facilmente le immagini in una griglia di righe e colonne.

Il blocco Galleria è dotato di opzioni di allineamento simili nella barra degli strumenti.

È possibile allineare l’intero blocco della galleria a sinistra, al centro o a destra. È anche possibile renderlo largo o modificarlo in una riga a tutta larghezza.

Align gallery images in WordPress post editor

La funzione di galleria predefinita di WordPress è abbastanza buona. Tuttavia, se aggiungete regolarmente gallerie fotografiche ai vostri post e pagine di WordPress, prendete in considerazione l’utilizzo di un plugin per gallerie fotografiche come Envira Gallery.

Questi plugin vi daranno più opzioni per allineare le immagini nelle vostre gallerie fotografiche, visualizzarle nel popup e stilizzarle in modo diverso.

Come aggiungere due immagini affiancate in WordPress

Il modo più semplice per visualizzare due immagini affiancate in un post di WordPress è aggiungere entrambe le immagini in un blocco Galleria.

Display two images side by side in WordPress posts and pages

È sufficiente selezionare un layout a 2 colonne per il blocco della galleria, in modo da visualizzare entrambe le immagini una accanto all’altra. Si può anche selezionare l’opzione “Ritaglia miniatura” per assicurarsi che entrambe le immagini abbiano le stesse dimensioni.

Altri modi per aggiungere e allineare le immagini in WordPress

Oltre alle immagini, ai media e al testo e al blocco Galleria, è possibile utilizzare il blocco Copertina per aggiungere un’immagine di copertina.

Nel web design moderno, le immagini di copertina vengono utilizzate per creare layout di contenuto altamente coinvolgenti. Queste immagini vengono utilizzate per evidenziare le diverse sezioni di una pagina.

Il blocco immagine di copertina offre le stesse opzioni di allineamento di un blocco immagine. È possibile aggiungere del testo sopra l’immagine e scegliere un colore di sovrapposizione dalle impostazioni del blocco. La cosa migliore è che si può selezionare l’opzione “Sfondo fisso”, che crea un effetto di parallasse sullo sfondo.

Cover image in WordPress

Per saperne di più sull’uso delle immagini di copertina, consultate il nostro articolo sulla differenza tra immagini in evidenza e immagini di copertina in WordPress.

Finora abbiamo parlato dell’aggiunta di immagini direttamente ai vostri post e alle vostre pagine. E le immagini provenienti da siti terzi?

L’editor di blocchi semplifica anche questo aspetto. È possibile aggiungere immagini dai più diffusi siti di condivisione sociale, tra cui Instagram, Facebook, Flickr, Imgur, Photobucket e altri ancora.

Ad esempio, se si desidera aggiungere una foto di Instagram, è sufficiente aggiungere il blocco Instagram all’editor dei post e inserire l’URL del post che si desidera condividere.

Instagram embed in WordPress

Quindi, è sufficiente fare clic sull’allineamento desiderato nella barra degli strumenti. I blocchi di incorporamento consentono anche di incorporare facilmente i video in WordPress.

Per maggiori dettagli, consultate la nostra guida su come incorporare Instagram in WordPress.

Speriamo che questo articolo vi abbia aiutato a capire come aggiungere e allineare facilmente le immagini nell’editor di blocchi di WordPress. Potreste anche voler consultare la nostra guida su come ottimizzare le immagini per velocizzare WordPress e i migliori software di progettazione.

Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.

Divulgazione: I nostri contenuti sono sostenuti dai lettori. Ciò significa che se cliccate su alcuni dei nostri link, potremmo guadagnare una commissione. Vedi come WPBeginner è finanziato , perché è importante e come puoi sostenerci. Ecco il nostro processo editoriale .

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.

Il kit di strumenti WordPress definitivo

Ottenete l'accesso gratuito al nostro kit di strumenti - una raccolta di prodotti e risorse relative a WordPress che ogni professionista dovrebbe avere!

Reader Interactions

64 commentiLascia una risposta

  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.

      Admin

  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.

      Admin

    • 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.

      Admin

  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.

      Admin

  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.

      Admin

  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

      Admin

  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.

      Admin

  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

      Admin

  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.

      Admin

  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.

      Admin

  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

      Admin

  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

      Admin

  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 :)

      Admin

  21. Roxana Snedeker says

    What is the best way to add multiple images at once, I can’t seem to add more than one at the time :(

    • 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

      Admin

    • 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.

      Admin

  22. 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.

      Admin

  23. 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.

      Admin

  24. 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

      Admin

  25. 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.

      Admin

      • 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.

  26. 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.

      Admin

Lascia una risposta

Grazie per aver scelto di lasciare un commento. Tenga presente che tutti i commenti sono moderati in base alle nostre politica dei commenti e il suo indirizzo e-mail NON sarà pubblicato. Si prega di NON utilizzare parole chiave nel campo del nome. Avremo una conversazione personale e significativa.