Wire up the Filtered Image block end-to-end

This commit is contained in:
Keith Solomon
2026-08-05 16:48:03 -05:00
parent c2a0ae2d8c
commit d21d3c9ac2
5 changed files with 285 additions and 3 deletions
+65
View File
@@ -0,0 +1,65 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "ksolo/image-filter",
"version": "0.1.0",
"title": "Filtered Image",
"category": "media",
"icon": "image-filter",
"description": "An image with an Instagram-style filter applied.",
"keywords": [ "filter", "instagram", "image" ],
"textdomain": "image-filters",
"supports": {
"align": [ "left", "center", "right", "wide", "full" ],
"anchor": true,
"html": false,
"spacing": { "margin": true }
},
"attributes": {
"filter": {
"type": "string",
"default": "normal"
},
"intensity": {
"type": "number",
"default": 100
},
"imageId": {
"type": "number",
"default": 0
},
"imageUrl": {
"type": "string",
"default": "",
"source": "attribute",
"selector": "img",
"attribute": "src"
},
"imageAlt": {
"type": "string",
"default": "",
"source": "attribute",
"selector": "img",
"attribute": "alt"
},
"width": {
"type": "number"
},
"height": {
"type": "number"
},
"linkUrl": {
"type": "string",
"default": ""
},
"caption": {
"type": "string",
"default": "",
"source": "html",
"selector": "figcaption"
}
},
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css"
}