Drop-shadow filters.

Adding a shadow to an image with an alpha channel using the `box-shadow` property doesn't wrap the shadow around the transparent parts of the image. Instead we just get a square box shadow. In order to make the shadow wrap naturally around the contours of the image, we need to use `filter: drop-shadow(x, y, blur, spread, color)`.

This is a useful feature for two reasons:

  1. Applying a drop shadow for images with alpha channels. This one is pretty obvious. If we have an image, a logo for example, that we want to raise off the background, a shadow that wraps the contours of the logo is a great way to pull the logo forward and pop out of the page. (Example: I used this for the logos in the footer of this website http://www2.unb.ca/alc/)
  2. Applying an outline/border for images with alpha channels. This is a lesser-known use case for the drop-shadow filter. By combining several drop-shadows, we can add a shadow that functions like an image outline. This is useful if a logo is placed on top of a busy background or if parts of a logo have poor contrast with a background. (Example: I didn't use drop-shadow for this but it's the same idea for the colored titles on this website: http://davidleger95.github.io/nac-website/)
  • David Leger
  • Jun 2 2018
  • Reviewed
  • WeAre8 Editor commented
    13 Mar 04:04

    MUST HAVE

  • Christopher Maier commented
    07 Mar 08:01

    Insane how this isn't added already.

  • Steve commented
    June 29, 2023 00:25

    +1 for this

  • Kyle Kirchgessner commented
    April 28, 2023 01:36

    PLEASE!!!

  • Web LoveWell commented
    July 07, 2022 20:07

    Just saying, Wix has this feature and Webflow doesn't. That should be enough for them to add it ASAP.

  • Daniel Blaho commented
    April 16, 2022 05:35

    This would be a fantastic upgrade! Next, clip-path. The possibilities... phew man that would awesome.

  • Lasse Wennerholm Linding commented
    January 27, 2022 11:44

    We need this! I'm forced to upload my image content as png's..

  • Xanthe commented
    June 23, 2021 09:42

    I'm sad that this isn't a thing yet - have to still add custom code to get a shadow on a SVG instead of around its container :(

  • Trilo commented
    April 12, 2021 10:40

    I've been trying to figure out if this is possible. Any updates here webflow?

  • Tony Mungiguerra commented
    November 27, 2018 17:58

    It is way more logical to apply the shadow to the image rather than the image's container. I'm a bit stumped as to why it works the way it does since you can apply shadows to whatever when you are actually writing CSS.

  • +26