-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Filterable behavior for Image Block raw transformations #8473
Copy link
Copy link
Open
Labels
Backwards CompatibilityIssues or PRs that impact backwards compatabilityIssues or PRs that impact backwards compatability[Feature] BlocksOverall functionality of blocksOverall functionality of blocks[Feature] ExtensibilityThe ability to extend blocks or the editing experienceThe ability to extend blocks or the editing experience[Feature] MediaAnything that impacts the experience of managing mediaAnything that impacts the experience of managing media[Feature] Paste[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Milestone
Metadata
Metadata
Assignees
Labels
Backwards CompatibilityIssues or PRs that impact backwards compatabilityIssues or PRs that impact backwards compatability[Feature] BlocksOverall functionality of blocksOverall functionality of blocks[Feature] ExtensibilityThe ability to extend blocks or the editing experienceThe ability to extend blocks or the editing experience[Feature] MediaAnything that impacts the experience of managing mediaAnything that impacts the experience of managing media[Feature] Paste[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Type
Fields
Give feedbackNo fields configured for issues without a type.
One of the plugins I work on, Tasty Pins, offers the ability to add "Pinterest Text" to an image (related #8472). When the image ends up in the Classic Editor, its markup looks like this:
Notice the inclusion of
data-pin-description="This cashew coffee is delicious, creamy, and easy. Perfect for a chilly morning! | pinchof yum.com".When this image is transformed to an Image Block, the
data-pin-descriptionattribute is lost, even though I've registered it as a custom attribute to the block (related #8470, #6878).What's the best way to filter the Image Block transform behavior? It doesn't appear plugins have much control over the behavior:
gutenberg/core-blocks/image/index.js
Lines 112 to 125 in 804abec