{"id":11284896,"date":"2019-03-07T09:41:44","date_gmt":"2019-03-07T09:41:44","guid":{"rendered":"https:\/\/wordpress.org\/support\/?post_type=helphub_article&#038;p=11284896"},"modified":"2026-05-29T19:10:30","modified_gmt":"2026-05-29T19:10:30","slug":"gallery-block","status":"publish","type":"helphub_article","link":"https:\/\/wordpress.org\/documentation\/article\/gallery-block\/","title":{"rendered":"Gallery block"},"content":{"rendered":"\n<p class=\"has-text-align-right has-small-font-size wp-block-paragraph\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/blocks\/\">Go back to the list of Blocks<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Gallery block allows you to easily add multiple photos and automatically arrange them in a gallery. You can control the number of columns and the size of the images in the gallery.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add a Gallery block<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Gallery block can be added to a page by clicking on the&nbsp;Block Inserter&nbsp;<strong>(+)<\/strong> icon and selecting the&nbsp;Gallery block.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter is-resized size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"542\" src=\"https:\/\/wordpress.org\/documentation\/files\/2021\/12\/Screen-Shot-2021-12-21-at-4.09.44-PM-1024x542.png\" alt=\"Image showing the Quick Inserter with gallery in the search field. \" class=\"wp-image-15185965\" style=\"aspect-ratio:1.8923076923076922;width:566px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2021\/12\/Screen-Shot-2021-12-21-at-4.09.44-PM-1024x542.png 1024w, https:\/\/wordpress.org\/documentation\/files\/2021\/12\/Screen-Shot-2021-12-21-at-4.09.44-PM-300x159.png 300w, https:\/\/wordpress.org\/documentation\/files\/2021\/12\/Screen-Shot-2021-12-21-at-4.09.44-PM-768x407.png 768w, https:\/\/wordpress.org\/documentation\/files\/2021\/12\/Screen-Shot-2021-12-21-at-4.09.44-PM-1536x813.png 1536w, https:\/\/wordpress.org\/documentation\/files\/2021\/12\/Screen-Shot-2021-12-21-at-4.09.44-PM-2048x1084.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Adding the Gallery block<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively, you can type <code>\/gallery<\/code> and press Enter.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter is-resized size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"726\" src=\"https:\/\/wordpress.org\/documentation\/files\/2021\/12\/Screen-Shot-2021-12-21-at-4.08.17-PM-1024x726.png\" alt=\"Image of the slash inserter with the gallery block listed.\" class=\"wp-image-15185961\" style=\"aspect-ratio:1.4126984126984128;width:503px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2021\/12\/Screen-Shot-2021-12-21-at-4.08.17-PM-1024x726.png 1024w, https:\/\/wordpress.org\/documentation\/files\/2021\/12\/Screen-Shot-2021-12-21-at-4.08.17-PM-300x213.png 300w, https:\/\/wordpress.org\/documentation\/files\/2021\/12\/Screen-Shot-2021-12-21-at-4.08.17-PM-768x544.png 768w, https:\/\/wordpress.org\/documentation\/files\/2021\/12\/Screen-Shot-2021-12-21-at-4.08.17-PM.png 1326w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Adding the Gallery block with  <em>\/gallery<\/em> shortcut<\/figcaption><\/figure>\n\n\n\n<p class=\"has-text-align-left has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/adding-a-new-block\/\">Detailed instructions on adding blocks<\/a><\/p>\n\n\n\n<h2 id=\"block-toolbar\" class=\"wp-block-heading\">Block toolbar<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Each block has its own block-specific controls that allow you to manipulate the block right in the editor.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">For the entire block<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;Gallery block&nbsp;has a toolbar for the individual images as well as a toolbar for the entire Gallery block.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"496\" height=\"52\" src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/2026-02-15_12-20.jpg\" alt=\"Block editor toolbar showing image tools and formatting options, with a Replace button on the right.\" class=\"wp-image-16366725\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/2026-02-15_12-20.jpg 496w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/2026-02-15_12-20-300x31.jpg 300w\" sizes=\"auto, (max-width: 496px) 100vw, 496px\" \/><figcaption class=\"wp-element-caption\">Block editor toolbar showing image tools and formatting options, with a Replace button on the right.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The main options in the Gallery block toolbar are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Transform to<\/li>\n\n\n\n<li>Block moving handles\n<ul class=\"wp-block-list\">\n<li>Drag and drop <\/li>\n\n\n\n<li>Move up and down<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Change alignment<\/li>\n\n\n\n<li>Link<\/li>\n\n\n\n<li>Caption <\/li>\n\n\n\n<li>Add button<\/li>\n\n\n\n<li>More options<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Transform to<\/h4>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"316\" height=\"278\" src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/galler-block-transform-to.jpg\" alt=\"Block editor \u2018Transform to\u2019 menu open, showing options like Columns, Details, Group, and Image.\" class=\"wp-image-16366727\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/galler-block-transform-to.jpg 316w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/galler-block-transform-to-300x264.jpg 300w\" sizes=\"auto, (max-width: 316px) 100vw, 316px\" \/><figcaption class=\"wp-element-caption\">Block editor \u2018Transform to\u2019 menu open, showing options like Columns, Details, Group, and Image.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can transform or change the block to another block including the Group, Image, and Column blocks. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When you change the block type to the Image block, every image in your gallery will be converted into a single image block. <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Block moving handles<\/h4>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"610\" height=\"142\" src=\"https:\/\/wordpress.org\/documentation\/files\/2022\/08\/Screen-Shot-2022-08-20-at-10.16.08-AM.png\" alt=\"Moving a gallery block\" class=\"wp-image-15934565\" style=\"width:394px;height:92px\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2022\/08\/Screen-Shot-2022-08-20-at-10.16.08-AM.png 610w, https:\/\/wordpress.org\/documentation\/files\/2022\/08\/Screen-Shot-2022-08-20-at-10.16.08-AM-300x70.png 300w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The block-moving handles allow you to move the block up and down the editor. Use the six dots icon to drag and drop the&nbsp;Gallery&nbsp;block and place it anywhere on the page. Alternatively, click on the up and down arrows to move the block up or down.<\/p>\n\n\n\n<p class=\"has-text-align-left has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/adding-a-new-block\/\"><\/a><a rel=\"noreferrer noopener\" href=\"https:\/\/wordpress.org\/documentation\/article\/moving-blocks\/\" target=\"_blank\">Get more information about moving a block within the editor.<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Change alignment<\/h4>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"464\" height=\"610\" src=\"https:\/\/wordpress.org\/documentation\/files\/2022\/08\/Screen-Shot-2022-08-20-at-10.16.28-AM.png\" alt=\"Gallery block alignment and width\" class=\"wp-image-15934566\" style=\"width:232px;height:305px\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2022\/08\/Screen-Shot-2022-08-20-at-10.16.28-AM.png 464w, https:\/\/wordpress.org\/documentation\/files\/2022\/08\/Screen-Shot-2022-08-20-at-10.16.28-AM-228x300.png 228w\" sizes=\"auto, (max-width: 464px) 100vw, 464px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Align left<\/strong> &#8211; Make the block align-center<\/li>\n\n\n\n<li><strong>Align center<\/strong> &#8211; Make the block alignment centered<\/li>\n\n\n\n<li><strong>Align right <\/strong>&#8211; Make the&nbsp;block align-right<\/li>\n\n\n\n<li><strong>Wide width<\/strong> &#8211; Increase the width of the block beyond the content size<\/li>\n\n\n\n<li><strong>Full width<\/strong> &#8211; Extend the block to cover the full width of the screen.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Wide width and Full width alignment options are only available if they are enabled in your theme.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Link<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">You can choose link options to apply to all images in your gallery.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"408\" src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/Screenshot-2026-03-06-at-3.05.21-PM-1024x408.jpg\" alt=\"Gallery link options.\" class=\"wp-image-16367013\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/Screenshot-2026-03-06-at-3.05.21-PM-1024x408.jpg 1024w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/Screenshot-2026-03-06-at-3.05.21-PM-300x119.jpg 300w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/Screenshot-2026-03-06-at-3.05.21-PM-766x305.jpg 766w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/Screenshot-2026-03-06-at-3.05.21-PM-1.jpg 1382w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Link images to attachment pages<\/strong> &#8211; Selecting this option will link the image to its WordPress media <a href=\"https:\/\/wordpress.org\/documentation\/article\/inserting-images-into-posts-and-pages\/#step-4-attachment-details\">attachment<\/a> page.<\/li>\n\n\n\n<li>This is an informational page about your image, which includes the image, the caption, the image description, and a comment field.<\/li>\n\n\n\n<li><strong>Link images to media files<\/strong> &#8211; Selecting this option will link the image to the image file in the original size in a new browser window.<\/li>\n\n\n\n<li><strong>Enlarge on click<\/strong> &#8211; Selecting this option lets visitors open gallery images in a larger view, also known as a lightbox, without leaving the page. Visitors can move forward and backward through the images in the gallery.<\/li>\n\n\n\n<li><strong>None<\/strong>: Selecting this option will not link the image to anything.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Caption for the gallery<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">You can add this by clicking on the caption icon on the block settings toolbar.  <\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-caption-1024x641.png\" alt=\"Adding a caption to the gallery block\" class=\"wp-image-16356316\" style=\"width:512px;height:321px\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-caption-1024x641.png 1024w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-caption-300x188.png 300w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-caption-768x481.png 768w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-caption.png 1338w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Adding a caption to the Gallery block<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Adding images<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Add<\/strong> button in the Gallery block lets you add images to the gallery.  You have two options to add images to the Gallery block:&nbsp;<strong>Open Media Library<\/strong> and <strong>Upload<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"532\" height=\"354\" src=\"https:\/\/wordpress.org\/documentation\/files\/2022\/08\/Screen-Shot-2022-08-20-at-10.16.45-AM.png\" alt=\"Adding images to the gallery block\" class=\"wp-image-15934580\" style=\"width:347px;height:231px\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2022\/08\/Screen-Shot-2022-08-20-at-10.16.45-AM.png 532w, https:\/\/wordpress.org\/documentation\/files\/2022\/08\/Screen-Shot-2022-08-20-at-10.16.45-AM-300x200.png 300w\" sizes=\"auto, (max-width: 532px) 100vw, 532px\" \/><figcaption class=\"wp-element-caption\">Adding images to the Gallery block<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The Upload option allows you to upload a new image or multiple images to the&nbsp;Gallery block&nbsp;and to your media library. The Media Library option lets you select from previously uploaded images in your Media Library. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also drag and drop multiple images at the same time from your explorer or finder window into the Gallery block.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively, you can open the main inserter panel on the editor and open the media tab. Then, you can drag and drop images from the media library and Openverse into the Gallery block.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">More options<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">These controls give you the option to copy, duplicate, and edit your block as HTML.<\/p>\n\n\n\n<p class=\"has-text-align-left has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/moving-blocks\/\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><a href=\"https:\/\/wordpress.org\/documentation\/article\/more-options\/\">Read about these and other settings.<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">For an individual image<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Each image inside a Gallery block is an Image block. When you select an individual image, the toolbar shows Image block controls for that image, such as link, crop, replace, and more. These settings affect only the selected image, not the entire Gallery block.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"219\" src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-toolbar-select-gallery-button-1024x219.png\" alt=\"Individual image block toolbar with the &apos;Select parent block: Gallery&apos; button in focus\" class=\"wp-image-16368103\" style=\"aspect-ratio:4.676333943404195;width:687px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-toolbar-select-gallery-button-1024x219.png 1024w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-toolbar-select-gallery-button-300x64.png 300w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-toolbar-select-gallery-button-768x164.png 768w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-toolbar-select-gallery-button.png 1178w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Use the <strong>Select parent block: Gallery<\/strong> button in the toolbar to return to the full Gallery block settings. This lets you edit gallery-wide settings, such as columns, image resolution, cropping, and layout.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note<\/strong>: Some options such as Add text over image or Align may not be present or may not work as expected when an Image block is inside a Gallery block.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Move images<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">After you add images to the Gallery block, you can change the order of images in the gallery. Click on an image and in the block toolbar use the <strong>move left<\/strong> and <strong>move right<\/strong> arrow handles or drag\/drop button (six dots) to arrange the images as you like.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1622\" style=\"aspect-ratio: 3020 \/ 1622;\" width=\"3020\" controls src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-moving-images.mp4\"><\/video><\/figure>\n\n\n\n<p class=\"has-text-align-left has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/image-block\/\">Learn about additional block settings on the Image block page.<\/a><\/p>\n\n\n\n<h2 id=\"block-settings\" class=\"wp-block-heading\">Block settings<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Every block has specific options in the editor sidebar in addition to the options found in the block toolbar. If you do not see the sidebar, click on the Settings button next to the Save\/Publish button.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"453\" height=\"104\" src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/block-settings-7-0.png\" alt=\"Settings button highlighted in the block editor next to the Save button.\" class=\"wp-image-16368002\" style=\"aspect-ratio:2.58950201884253;object-fit:contain\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/block-settings-7-0.png 453w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/block-settings-7-0-300x69.png 300w\" sizes=\"auto, (max-width: 453px) 100vw, 453px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The Gallery block settings panel is divided into three tabs \u2013 List View, Settings, and Styles.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">List View<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The List View tab allows you to drag and drop images within the gallery to reorder them. When hovering over an image in List View, click on the More options menu (three dots) for additional block controls like copy, duplicate, hide, delete, and more.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1552\" style=\"aspect-ratio: 3020 \/ 1552;\" width=\"3020\" controls src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-list-view-demo.mov\"><\/video><\/figure>\n\n\n\n<p class=\"has-text-align-left has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/more-options\/\" data-type=\"helphub_article\" data-id=\"13748329\">Learn about the More options menu<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Settings<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Gallery block includes the following settings options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Columns<\/li>\n\n\n\n<li>Resolution<\/li>\n\n\n\n<li>Crop images to fit<\/li>\n\n\n\n<li>Randomize order<\/li>\n\n\n\n<li>Open images in a new tab \n<ul class=\"wp-block-list\">\n<li>Only appears if <a href=\"#link\" data-type=\"internal\" data-id=\"#link\">Link options<\/a> are enabled.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Aspect Ratio<\/li>\n\n\n\n<li>Navigation button type\n<ul class=\"wp-block-list\">\n<li>Only appears if <strong>Enlarge on click<\/strong> is enabled in <a href=\"#link\" data-type=\"internal\" data-id=\"#link\">Link options<\/a>.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Advanced<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"575\" height=\"1243\" src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-settings-e1779421075171.png\" alt=\"Gallery block settings including column slider, resolution dropdown, and image controls.\" class=\"wp-image-16368108\" style=\"aspect-ratio:0.39258026624902115;object-fit:contain;width:251px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-settings-e1779421075171.png 575w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-settings-e1779421075171-139x300.png 139w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-settings-e1779421075171-474x1024.png 474w\" sizes=\"auto, (max-width: 575px) 100vw, 575px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Columns<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Use the Columns setting to choose how many columns appear in the gallery.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can choose 1 to 8 columns, but only up to the number of images in the gallery. For example, a gallery with 4 images can have up to 4 columns. Add more images to use more columns, up to the maximum of 8.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To change the number of columns, either:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>enter a number in the field<\/li>\n\n\n\n<li>use the slider to increase or decrease the number of columns<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Resolution<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">You can also choose the <strong>Resolution<\/strong> of your image with options that may include Full Size, Large, Medium and Thumbnail depending on what your theme supports and the size of the originally uploaded image.<\/p>\n\n\n\n<p class=\"has-text-align-left has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/image-size-and-quality\/\">Learn more about image size and quality<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Crop images to fit<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">You can select whether or not you&#8217;d like all of your images to be cropped in your Gallery block. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This option is useful if you have images of varying sizes and shapes. Cropping them will make the images in each row of the gallery the same size. You can toggle this option on and off to see which way you prefer.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Open images in a new tab<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If any <a href=\"https:\/\/wordpress.org\/documentation\/article\/gallery-block\/#link\">Link options<\/a> are enabled for the gallery, you can choose whether you want images to open in a new browser tab window when the visitor clicks on them.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Randomize order<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">You can choose to randomize the order of images in the Gallery block.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note<\/strong>: This setting will display the images in a randomized order on the published page\/post. However, in the block editor, the images will appear in the order they were added.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Aspect ratio<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The Aspect Ratio<strong> <\/strong>setting modifies the aspect ratio for all of the images within the Gallery with the choices in the dropdown list,  enabling you to set a consistent aspect ratio.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1558\" style=\"aspect-ratio: 3020 \/ 1558;\" width=\"3020\" controls src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-aspect-ratio.mp4\"><\/video><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Navigation button type<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If&nbsp; <strong>Enlarge on click <\/strong>is enabled in <a href=\"#link\" data-type=\"internal\" data-id=\"#link\">Link options<\/a> for the Gallery, you can select the following button styles. These are the previous, next, and close buttons that display in the lightbox view to help users navigate your images.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Icon<\/strong>: only icons display<\/li>\n\n\n\n<li><strong>Text<\/strong>: only text labels display<\/li>\n\n\n\n<li><strong>Both<\/strong>: both icons and text labels display<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1896\" style=\"aspect-ratio: 3020 \/ 1896;\" width=\"3020\" controls src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-lightbox-navigation-buttons.mp4\"><\/video><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Advanced settings<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The Gallery block provides the following Advanced settings options: HTML Anchor, Additional CSS Class(es), Additional CSS, and Styles.<\/p>\n\n\n\n<p class=\"has-text-align-left has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/advanced-settings-overview\/\" data-type=\"helphub_article\" data-id=\"16367843\">Learn more about advanced settings<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Styles<\/h3>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"425\" height=\"1024\" src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-styles-425x1024.png\" alt=\"\" class=\"wp-image-16368110\" style=\"width:275px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-styles-425x1024.png 425w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-styles-125x300.png 125w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/gallery-block-styles.png 574w\" sizes=\"auto, (max-width: 425px) 100vw, 425px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Color<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The Gallery block<strong> <\/strong>provides color settings options to change the background for the block<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\">For details, refer to this support article: <a href=\"https:\/\/wordpress.org\/documentation\/article\/colors-settings-overview\/\">Color settings overview<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Dimensions<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The Gallery block<strong> <\/strong>provides dimension settings options to add padding and margin.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\">For details refer to this support article: <a href=\"https:\/\/wordpress.org\/documentation\/article\/dimension-controls-overview\/\">Dimension settings overview<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Border<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The Gallery block provides border settings options to add border color, width, and radius.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#e5f5fa\">For details refer to this support article: <a href=\"https:\/\/wordpress.org\/documentation\/article\/border-settings-overview\/\">Border settings overview<\/a><\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-group changelog has-very-dark-gray-color has-very-light-gray-background-color has-text-color has-background is-layout-flow wp-block-group-is-layout-flow\">\n<h2 id=\"changelog\" class=\"wp-block-heading has-medium-font-size\">Changelog <\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Updated 2026-05-21 (props to @kjoyner @madhudollu @jameskoster @paaljoachim @wildworks @joen @dmsnell)\n<ul class=\"wp-block-list\">\n<li>Updated block toolbar and block settings to include new lightbox controls and settings<\/li>\n\n\n\n<li>Updated Enlarge on click definition to clarify lightbox effect <\/li>\n\n\n\n<li>Updated screenshots and videos for WordPress 7.0<\/li>\n\n\n\n<li>Updated Advanced Settings to refer to new advanced settings overview page<\/li>\n\n\n\n<li>Added video of List View, moving images, and lightbox navigation controls<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2026-03-08 (props to @awetz583 @CalolanC @leonnugraha)\n<ul class=\"wp-block-list\">\n<li>Removed duplicate content<\/li>\n\n\n\n<li>Updated gallery link options<\/li>\n\n\n\n<li>Updated block toolbar and settings screenshots<\/li>\n\n\n\n<li>Updated settings with randomize feature <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2026-02-15\n<ul class=\"wp-block-list\">\n<li>Updated toolbar &amp; &#8220;transform to&#8221; screenshots(@rollybueno)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2025-07-05\n<ul class=\"wp-block-list\">\n<li>Added Enlarge on click option of the image<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2024-01-16\n<ul class=\"wp-block-list\">\n<li>Updated screenshots and content for 6.3<\/li>\n\n\n\n<li>Fixed text formatting consistecy<\/li>\n\n\n\n<li>Added missing alt text to screenshots <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2023-03-29\n<ul class=\"wp-block-list\">\n<li>Added the option to clear duotone<\/li>\n\n\n\n<li>Added information about the style settings tab<\/li>\n\n\n\n<li>Added caption button for Gallery <\/li>\n\n\n\n<li>Updated screenshot and Videos for 6.2  <\/li>\n\n\n\n<li>Added Alt text  <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2022-12-12\n<ul class=\"wp-block-list\">\n<li>Added color settings<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2022-11-20\n<ul class=\"wp-block-list\">\n<li>Adjusted images for mobile view <\/li>\n\n\n\n<li>Added caption for images <\/li>\n\n\n\n<li>Removed redundant content <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2022-08-21<ul><li>Added 6.0 screenshots and videos.Updated block toolbar with Add button and replace the info with the updated process for adding images to the gallery.Reordered the info to separate for the block toolbar and block sidebar. Adding Dimensions to the block settings with video.Updating the blosk settings for images.<\/li><\/ul>\n<ul class=\"wp-block-list\">\n<li>Adding details for image customizations with content, screenshots and video.<\/li>\n\n\n\n<li>Added ALT tags for images.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2021-12-21\n<ul class=\"wp-block-list\">\n<li>Updated all screenshots for 5.9 with higher resolution.<\/li>\n\n\n\n<li>Added in a context related to the refactoring. <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2021-02-02\n<ul class=\"wp-block-list\">\n<li>Updated the 5.5 video with 5.6 gifs<\/li>\n\n\n\n<li>Updated all screenshots with 5.6<\/li>\n\n\n\n<li>Added details to Advanced block settings options<\/li>\n\n\n\n<li>Updated out-of-date contents<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2020-10-05\n<ul class=\"wp-block-list\">\n<li>Updated the video<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2020-09-14\n<ul class=\"wp-block-list\">\n<li>Updated 5.5 screenshots<\/li>\n\n\n\n<li>Updated Block toolbar new features<\/li>\n\n\n\n<li>Updated Block settings new features<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2020-06-18\n<ul class=\"wp-block-list\">\n<li>Added &#8216;Link back to blocks&#8217; to the top of the page<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2020-04-24\n<ul class=\"wp-block-list\">\n<li>Added Drag &amp; Drop multiple images to the Gallery block<\/li>\n\n\n\n<li>Added video to change the background color as group block<\/li>\n\n\n\n<li>Added updated UI displays for WordPress 5.4 <\/li>\n\n\n\n<li>Added &#8220;More Options&#8221; to the Block Toolbar section and updated the existing once to fit other block descriptions. <\/li>\n\n\n\n<li>Reorganized the post into 3 sections: How to add gallery and images, Block Toolbar and Block Settings. <\/li>\n\n\n\n<li>Converted all reusable blocks to regular blocks. <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Created 2019-03-07<\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Go back to the list of Blocks The Gallery block allows you to easily add multiple photos and automatically arrange them in a gallery. You can control the number of columns and the size of the images in the gallery. Add a Gallery block The Gallery block can be added to a page by clicking [&hellip;]<\/p>\n","protected":false},"author":16127499,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false},"category":[80,84],"class_list":["post-11284896","helphub_article","type-helphub_article","status-publish","hentry","category-customization","category-media-blocks"],"revision_note":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles\/11284896","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles"}],"about":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/types\/helphub_article"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/comments?post=11284896"}],"version-history":[{"count":69,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles\/11284896\/revisions"}],"predecessor-version":[{"id":16368655,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles\/11284896\/revisions\/16368655"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wporg\/v1\/users\/sophiegy"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/media?parent=11284896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/category?post=11284896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}