You're looking to display the alt text next to each image in a Webflow Collection that uses the Multi-Image Field, which Webflow does not directly support via binding alt text in the Designer.
1. Understand Webflow’s Multi-Image Field Limitation
- Webflow allows you to bind images from a Multi-Image Field using a Collection List.
- Alt text for these images must be entered manually or accessed via custom code, since Webflow doesn’t expose alt text from multi-image fields in Designer.
2. Add a Collection List for Your Multi-Image Field
- Drag a Collection List into your Webflow page and bind it to the Multi-Image Field.
- Inside the Collection List, add an Image element and bind it to the multi-image source.
- Give the Image element a class like
custom-image.
3. Embed Custom HTML and JavaScript
- Add an Embed element below the Image element inside the same Collection Item.
- Paste the following code (edit class names if you use different ones):
<div class="image-alt-text"></div>
<script>
const img = document.currentScript.previousElementSibling;
const altText = img.getAttribute("alt");
const altDiv = document.currentScript.parentElement.querySelector(".image-alt-text");
if (altText && altDiv) {
altDiv.textContent = altText;
}
</script>
- This script fetches the
alt attribute of the image and displays it in the div.image-alt-text element.
4. Ensure Webflow Alt Tag Is Set per Image
- In the Collection’s CMS images, make sure each image has a valid alt text in the media asset’s settings. Webflow will apply this alt tag to the image when published.
Summary
To display alt tags for Multi-Image Field items, use a Collection List, insert an Image with alt text, and use custom JavaScript in an Embed block to extract and show the alt attribute next to each image.