To use an SVG shape as a clipping mask for images in Webflow, you'll need to embed the SVG and reference it via CSS using clip-path
or mask
. Webflow doesn’t natively support SVG masks through the visual interface, but you can accomplish it with a few custom steps.
For example, a basic blob shape SVG might include a <clipPath>
or a <mask>
element with a unique id
.
<clipPath>
or <mask>
with an id
.Example snippet inside the Embed block:
<svg width="0" height="0"> <defs> <clipPath id="blob-clip" clipPathUnits="objectBoundingBox"> <path d="M0.9,0.6 C0.95,0.3,0.7,0,0.5,0.05 C0.2,0.1,0.05,0.4,0.1,0.6 C0.2,0.9,0.6,1,0.8,0.9 C1,0.8,0.85,0.7,0.9,0.6 Z"/> </clipPath> </defs></svg>
background-image
.<style>
block targeting the image class:<style> .masked-image { clip-path: url(#blob-clip); -webkit-clip-path: url(#blob-clip); }</style>
clipPathUnits="objectBoundingBox"
to work:width: 100%
, height: auto
).You can view and clone an existing Webflow project that demonstrates SVG masking using clip-path
here:
Clonable Project:
https://webflow.com/website/svg-mask-demo
(Note: If unavailable, search Webflow Showcase for “SVG Clip Path” or “Blob Mask”)
To apply an SVG clipping mask in Webflow:
<clipPath>
ID.clip-path: url(#your-id)
via custom code.