Image FXcssimagelab.com
Filter · 24 / 56

Pencil Sketch

Converts the photo into a graphite line drawing — edges become pencil strokes on a paper-white ground.

Image
Green natural landscape

Hover the photo to apply the effect — move away to compare.

Adjust
1.4
4px
Metadata
interaction
Always on
browser
Enhanced — SVG filter
reduced motion
static
touch fallback
Identical on touch
Edit the CSS above — the preview updates live.

About Pencil Sketch

Pencil Sketch turns the photo into a line drawing: an SVG filter desaturates to luminance, softens slightly, runs a Laplacian edge-detect (feConvolveMatrix), then inverts so flat areas read as white paper and edges read as dark strokes. Switch --ifx-sketch between Fine Pencil, Bold Charcoal (wider strokes) and Chalk on Black (luminous lines, no invert); --ifx-sketch-contrast tunes stroke weight. IMPORTANT: the effect needs both the CSS and the inline <svg> <filter> block in the DOM — the copied HTML/React bundles it; include the <svg> only once per page so the filter ids stay unique. feConvolveMatrix is compute-heavy, so keep it on display-size images. It works best on photos with a clear subject/background separation. Fully static: identical on touch, nothing to reduce for prefers-reduced-motion.

Use cases

  • editorial
  • portfolio
  • illustration
  • branding

Browser support

Enhanced — SVG filter. This effect uses an enhanced feature — provide a graceful fallback for older browsers.

Accessibility

  • Essential content is never hidden behind hover.
  • No motion — nothing to reduce.
  • Touch fallback: identical on touch.