Skip to content
Brought to you by Allons-y Studio
dashly A standard library of filters, transforms, & shortcodes for Eleventy

clean-attrs

In Transforms

Eleventy transform that strips eleventy:ignore="" markers left on <img> tags inside <picture> elements. The official eleventyImageTransformPlugin only clears the attribute on bare <img> elements; this transform finishes the job.

import {
	createCleanAttrsTransform,
} from '@allons-y/dashly/transforms/clean-attrs';

createCleanAttrsTransform(options?)

Create the attribute-cleanup transform.

Parameters

Name Type Default Description
options (optional) object
options.attrs (optional) string[] Additional attribute names to strip. Defaults to ['eleventy:ignore'].

Returns

(content: string) => string

Allons-y Studio

Let's build something great together

A front-end & design systems studio helping teams ship consistent, accessible UI faster.