header-logo
Learn how to use Wix to build your site and business.
Design and manage your site using intuitive Wix features.
Manage subscriptions, plans and invoices.
Run your business and connect with members.
Learn to purchase, connect or transfer a domain to your site.
Get tools to grow your business and web presence.
Boost your visibility with SEO and marketing tools.
Get advanced features to help you work more efficiently.
Find solutions, learn about known issues or contact us.
placeholder-preview-image
Improve your skills with our courses and tutorials.
Get tips for web design, marketing and more.
Learn to increase organic site traffic from search engines.
Build a custom site using our full-stack platform.
Get matched with a specialist to help you reach your goals.
placeholder-preview-image

CMS: Connecting an Image to a Dataset

5 min
In this article
  • Connecting an image to a dataset
  • FAQs
Connect image elements to a dataset to display images from your CMS collection on your site. Datasets let you decide which collection fields connect to different parts of your image, such as the picture, alt text, or link. This is especially useful on dynamic list pages with repeaters, where each repeater item can display content from a different collection item—making it easy to manage and update visuals across your site.

Connecting an image to a dataset

Select the image element in your editor and connect it to the dataset that connects to the collection image(s) you want to display. Then connect the image source, alt text, and link to the relevant collection fields or actions. You can add new collection fields as needed, and decide what happens when visitors click the image, including setting how links open and their rel attributes.

Wix Editor
Studio Editor
  1. Go to the relevant page in your editor.
  2. Click the image you want to connect to the CMS. Learn how to add an image
  3. Click the Connect to CMS icon .  
  4. Click the Choose a dataset drop-down and select an existing dataset that connects to your collection. Alternatively, select Add a Dataset, then choose the collection you want to connect, give the dataset a name and click Create.
  5. Click the drop-downs under Connections to connect each part of the image to the relevant collection fields. You can select Add new field to create and connect a new collection field
    • Image source connects: Select the 'Image' field type you want to connect.
    • Alt text connects to: Select the field to use as the alt text for the images. You can choose from the following field types: 'Text', 'Number', 'Date', 'Date and Time', 'Address', and 'Tags'. Learn more about CMS alt text best practices
    • Link connects to: Choose what happens when visitors click the image. You can select a dataset click action (e.g. 'Submit', 'Load More'), a dynamic page to link to, or a field to open (e.g. a document, URL, image or video). 
      Note: When linking to a page or URL, choose how the link opens and set the rel link attributes
Screenshot of the dataset connection options for an image.
  1. Click Preview to test your connections. 
  2. Click Publish if you are ready to make the changes go live. 

FAQs

Click below for answers to common questions about connecting images to CMS collections.