1 { |
1 { |
2 "$schema": "https://schemas.wp.org/trunk/block.json", |
2 "$schema": "https://schemas.wp.org/trunk/block.json", |
3 "apiVersion": 2, |
3 "apiVersion": 3, |
4 "name": "core/image", |
4 "name": "core/image", |
5 "title": "Image", |
5 "title": "Image", |
6 "category": "media", |
6 "category": "media", |
7 "usesContext": [ "allowResize", "imageCrop", "fixedHeight" ], |
7 "usesContext": [ "allowResize", "imageCrop", "fixedHeight" ], |
8 "description": "Insert an image to make a visual statement.", |
8 "description": "Insert an image to make a visual statement.", |
9 "keywords": [ "img", "photo", "picture" ], |
9 "keywords": [ "img", "photo", "picture" ], |
10 "textdomain": "default", |
10 "textdomain": "default", |
11 "attributes": { |
11 "attributes": { |
12 "align": { |
|
13 "type": "string" |
|
14 }, |
|
15 "url": { |
12 "url": { |
16 "type": "string", |
13 "type": "string", |
17 "source": "attribute", |
14 "source": "attribute", |
18 "selector": "img", |
15 "selector": "img", |
19 "attribute": "src" |
16 "attribute": "src", |
|
17 "__experimentalRole": "content" |
20 }, |
18 }, |
21 "alt": { |
19 "alt": { |
22 "type": "string", |
20 "type": "string", |
23 "source": "attribute", |
21 "source": "attribute", |
24 "selector": "img", |
22 "selector": "img", |
25 "attribute": "alt", |
23 "attribute": "alt", |
26 "default": "" |
24 "default": "", |
|
25 "__experimentalRole": "content" |
27 }, |
26 }, |
28 "caption": { |
27 "caption": { |
29 "type": "string", |
28 "type": "rich-text", |
30 "source": "html", |
29 "source": "rich-text", |
31 "selector": "figcaption" |
30 "selector": "figcaption", |
|
31 "__experimentalRole": "content" |
|
32 }, |
|
33 "lightbox": { |
|
34 "type": "object", |
|
35 "enabled": { |
|
36 "type": "boolean" |
|
37 } |
32 }, |
38 }, |
33 "title": { |
39 "title": { |
34 "type": "string", |
40 "type": "string", |
35 "source": "attribute", |
41 "source": "attribute", |
36 "selector": "img", |
42 "selector": "img", |
37 "attribute": "title" |
43 "attribute": "title", |
|
44 "__experimentalRole": "content" |
38 }, |
45 }, |
39 "href": { |
46 "href": { |
40 "type": "string", |
47 "type": "string", |
41 "source": "attribute", |
48 "source": "attribute", |
42 "selector": "figure > a", |
49 "selector": "figure > a", |
43 "attribute": "href" |
50 "attribute": "href", |
|
51 "__experimentalRole": "content" |
44 }, |
52 }, |
45 "rel": { |
53 "rel": { |
46 "type": "string", |
54 "type": "string", |
47 "source": "attribute", |
55 "source": "attribute", |
48 "selector": "figure > a", |
56 "selector": "figure > a", |
75 "selector": "figure > a", |
90 "selector": "figure > a", |
76 "attribute": "target" |
91 "attribute": "target" |
77 } |
92 } |
78 }, |
93 }, |
79 "supports": { |
94 "supports": { |
|
95 "interactivity": true, |
|
96 "align": [ "left", "center", "right", "wide", "full" ], |
80 "anchor": true, |
97 "anchor": true, |
81 "color": { |
98 "color": { |
82 "__experimentalDuotone": "img", |
|
83 "text": false, |
99 "text": false, |
84 "background": false |
100 "background": false |
85 }, |
101 }, |
|
102 "filter": { |
|
103 "duotone": true |
|
104 }, |
86 "__experimentalBorder": { |
105 "__experimentalBorder": { |
|
106 "color": true, |
87 "radius": true, |
107 "radius": true, |
|
108 "width": true, |
|
109 "__experimentalSkipSerialization": true, |
88 "__experimentalDefaultControls": { |
110 "__experimentalDefaultControls": { |
89 "radius": true |
111 "color": true, |
|
112 "radius": true, |
|
113 "width": true |
90 } |
114 } |
|
115 }, |
|
116 "shadow": { |
|
117 "__experimentalSkipSerialization": true |
|
118 } |
|
119 }, |
|
120 "selectors": { |
|
121 "border": ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder", |
|
122 "shadow": ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder", |
|
123 "filter": { |
|
124 "duotone": ".wp-block-image img, .wp-block-image .components-placeholder" |
91 } |
125 } |
92 }, |
126 }, |
93 "styles": [ |
127 "styles": [ |
94 { |
128 { |
95 "name": "default", |
129 "name": "default", |