<!--
{
  "documentType" : "article",
  "framework" : "AppleNews",
  "identifier" : "/documentation/AppleNews/adding-a-mosaic-of-images",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Adding a Mosaic of Images"
}
-->

# Adding a Mosaic of Images

Display five images as mosaic tiles.

## Discussion

A mosaic lets you display images as part of a larger collection.

**On this page, you’ll learn how to use a mosaic to display images as a set of tiles.**

![Screenshot of an Apple News article with a mosaic on iPad.](images/com.apple.applenews/media-3624435@2x.png)

### Add a Mosaic with Captions in Your Article

In <doc://com.apple.applenews/documentation/AppleNews/setting-up-the-introductory-tutorial#Download-the-Article-Bundle-Examples>, you downloaded a bundle called `News_Design_Tutorial_5_Galleries` that contains gallery images and mosaic images. Now, you’ll move some of those images into your working folder and create a `mosaic` component to display the images.

In <doc://com.apple.applenews/documentation/AppleNews/positioning-text-components> and <doc://com.apple.applenews/documentation/AppleNews/adding-an-image-and-captions>, you created some `ComponentLayout` objects. You’ll refer to those `ComponentLayout` objects in this code.

1. Move the `mosaic-01.jpg`, `mosaic-02.jpg`, `mosaic-03.jpg`, `mosaic-04.jpg`, and `mosaic-05.jpg` files from the `Desktop/News_Design/Tutorial/News_Design_Tutorial_5_Galleries` folder that you downloaded in <doc://com.apple.applenews/documentation/AppleNews/setting-up-the-introductory-tutorial#Download-the-Article-Bundle-Examples> to the folder that contains your working `article.json` file.
2. Copy example code <doc://com.apple.applenews/documentation/AppleNews/adding-a-mosaic-of-images#Mosaic-Copy-This-Code>.
3. Paste the code inside the `components` array of your article, after the closing brace and comma (`},`) that end the `body` component whose `text` begins with `Et harum quidem`.

Your code should look like the example code <doc://com.apple.applenews/documentation/AppleNews/adding-a-mosaic-of-images#Mosaic-Result>.

After you make this change in your code, you can preview your working `article.json` file in News Preview to see a mosaic in your article.

#### Mosaic: Copy This Code

```json
   {
      "role": "heading2",
      "layout": "fullMarginAboveHalfBelowLayout",
      "text": "MOSAIC HEADING"
    },
    {
      "role": "mosaic",
      "layout": "noMarginLayout",
      "items": [
        {
          "URL": "bundle://mosaic-01.jpg",
          "caption": "A caption for the first image in the mosaic."
        },
        {
          "URL": "bundle://mosaic-02.jpg",
          "caption": "A caption for the second image in the mosaic."
        },
        {
          "URL": "bundle://mosaic-03.jpg",
          "caption": "A caption for the third image in the mosaic."
        },
        {
          "URL": "bundle://mosaic-04.jpg",
          "caption": "A caption for the fourth image in the mosaic."
        },
        {
          "URL": "bundle://mosaic-05.jpg",
          "caption": "A caption for the fifth image in the mosaic."
        }
      ]
    },
    {
      "role": "caption",
      "layout": "halfMarginBothLayout",
      "text": "ABOVE: A caption for the entire mosaic. Individual photos in the mosaic also have their own captions. (Shared attribution)"
    },
    {
      "role": "divider",
      "layout": "noMarginLayout",
      "stroke": {
        "width": 1,
        "color": "#D5B327"
      }
    },
```

#### Mosaic: Result

Ellipses (`...`) indicate lines of code that have been omitted from this example.

```json
{
  ...
  "components": [
    ...
    {
      "role": "heading2",
      "layout": "fullMarginAboveHalfBelowLayout",
      "text": "MOSAIC HEADING"
    },
    {
      "role": "mosaic",
      "layout": "noMarginLayout",
      "items": [
        {
          "URL": "bundle://mosaic-01.jpg",
          "caption": "A caption for the first image in the mosaic."
        },
        {
          "URL": "bundle://mosaic-02.jpg",
          "caption": "A caption for the second image in the mosaic."
        },
        {
          "URL": "bundle://mosaic-03.jpg",
          "caption": "A caption for the third image in the mosaic."
        },
        {
          "URL": "bundle://mosaic-04.jpg",
          "caption": "A caption for the fourth image in the mosaic."
        },
        {
          "URL": "bundle://mosaic-05.jpg",
          "caption": "A caption for the fifth image in the mosaic."
        }
      ]
    },
    {
      "role": "caption",
      "layout": "halfMarginBothLayout",
      "text": "ABOVE: A caption for the entire mosaic. Individual photos in the mosaic also have their own captions. (Shared attribution)"
    },
    {
      "role": "divider",
      "layout": "noMarginLayout",
      "stroke": {
        "width": 1,
        "color": "#D5B327"
      }
    },
    ...
  ],
  ...
}
```

### Further Exploration

At any time, you can try changing property values in your `article.json` file and then use News Preview to see how these changes affect the look of your article.

For example, try changing the order of images in your `mosaic` component by changing URLs:

1. In your `article.json` file, find the `mosaic` component.
2. In the first mosaic image’s `URL` property, replace the `01` with `02`.
3. In the second mosaic image’s `URL` property, replace the `02` with `01`.
4. Preview your `article.json` file in News Preview.

The order of your first and second images has been switched.

### Previous

<doc://com.apple.applenews/documentation/AppleNews/adding-a-gallery-of-images>

### Next

<doc://com.apple.applenews/documentation/AppleNews/adding-a-tweet>

## See Also

[`object Mosaic`](/documentation/AppleNewsFormat/Mosaic)

The component for displaying a set of images as tiles in no particular order.

[`object GalleryItem`](/documentation/AppleNewsFormat/GalleryItem)

An object used in a gallery or mosaic component for displaying an individual image.

[`object Caption`](/documentation/AppleNewsFormat/Caption)

The component for adding caption text.

[`object CaptionDescriptor`](/documentation/AppleNewsFormat/CaptionDescriptor)

The object you use in image components for displaying captions when the image is full-screen.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)