blurred borders on images

Hi, i'd like to create this effect, is there an easy way to do it with css? The borders of the image is blurred
23 Replies
Mannix
Mannix2y ago
looks like 2 same images on top of each other and the bigger one is blurred https://codepen.io/MannixMD/pen/jOxoJZx
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
the outside border should have straight lines like no blurred edge
Mannix
Mannix2y ago
can you link to this
Mannix
Mannix2y ago
i guess you could blur the image in photoshop right now i can't see this be done with just css
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
yeah it really is complicated but thanks for helping :p
Mannix
Mannix2y ago
i think i did it check the pen
Mannix
Mannix2y ago
it's 3 images not 2 🤣
MarkBoots
MarkBoots2y ago
with a lot of clippath points https://codepen.io/MarkBoots/pen/jOxoRbX
Mannix
Mannix2y ago
noice Mark 😄
MarkBoots
MarkBoots2y ago
i was hoping to manage it with only 1 image, but can't think of a way maybe with svg filters, but that's not my cup of tea
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
that clip path is insane xD
MarkBoots
MarkBoots2y ago
with mask-image it is a "bit" more readable/predictable https://codepen.io/MarkBoots/pen/MWGdRvg
MarkBoots
MarkBoots2y ago
backup image (pen will be removed in few days)
Ã̶̅n̴̊͑k̴̾͌s̵̒̐e̵͗̒l̴̿͋
how did you make this clip path?
MarkBoots
MarkBoots2y ago
with my mind 🙂 a polygon is made with x,y positions and each point separated with a comma first i go around the whole image, then i shift inwards with the size of the border and go back the other way around (with the border-size in mind) ive put some comments in the pen, so you can see
capt_uhu
capt_uhu2y ago
unless i'm missing something wouldn't a clip-path: inset(2rem); on the top image do the same thing? https://codepen.io/jsnkuhn/pen/qBYGzgd
MarkBoots
MarkBoots2y ago
the outer edge will still be blurred outside. but with an overflow hidden on the parent that will work too yes. good call
capt_uhu
capt_uhu2y ago
other thought is the first img should probably get a aria-hidden=true to hide it from screen readers