To change an image within a link block on hover in Webflow, you’ll need to use interactions or switch the image using combo classes and hover states.
1. Set Up Your Link Block and Image
- Drag a Link Block onto the canvas.
- Place an Image Element inside that link block. This is the default image users will see before hovering.
- Optionally, add another Image Element inside the same link block as the hover state image and hide it initially.
2. Use Combo Classes or States
There are two main approaches:
Option A: Use Hover State + Display Toggle
- Duplicate your image inside the link block: one for default state, one for hover.
- Select the hover image, go to the Style panel, and set Display: None under the default state.
- For the link block, go to its Hover state (in the top-right of the Style panel).
- Hide the default image (Display: None) and show the hover image (Display: Block or Flex).
- This causes image swap on hover.
Option B: Use Interactions
- Select the Link Block, go to the Interactions panel.
- Add a Mouse Hover (On Hover) trigger.
- On hover in, add an animation to hide the default image and show the hover image.
- On hover out, reverse the animation to restore the default image.
- Use Opacity or Display as desired in your animation steps (e.g., set default image opacity to 0 and hover image to 100%).
3. Style Your Images
- Match the size and alignment of both images to avoid layout shifts.
- Use absolute positioning within the link block if needed to layer the images.
Summary
To change an image on hover inside a link block, either (a) use hover states to toggle visibility between two images, or (b) use interactions for more control. Both methods allow smooth image swapping when the user hovers over the link block.