Image
Add an Image property to your component so designers can select images from their Webflow asset library.
Syntax
Prop definition
Define the Image prop in your Webflow code component with a name. Optionally, you can add a group and tooltip text.
Properties
name
: The name for the property.group
: The group for this property (optional).tooltip
: The tooltip for this property (optional).
Examples
Direct mapping
Define an Image property in your Webflow component, that directly maps to an image property in your React component.
Prop mapping
This example shows how to define an Image property in your Webflow component, with a wrapper to map the image property to an src
and alt
property in your React component.
Prop value
The Image prop provides both the image URL and alt text to your React component, making it easy to display dynamic images with proper accessibility.
Properties
src
: The source URL of the image.alt
: The alt text for the image (optional).
Webflow properties panel

Example
When to use
Use an Image prop when you want designers to:
- Select images from their asset library
- Change images without touching code
- Set alt text for accessibility
Best practices
- Handle missing images
- Use alt text for accessibility
- Consider responsive design needs