block.json 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. {
  2. "$schema": "https://schemas.wp.org/trunk/block.json",
  3. "apiVersion": 2,
  4. "name": "core/image",
  5. "title": "Image",
  6. "category": "media",
  7. "usesContext": [ "allowResize", "imageCrop", "fixedHeight" ],
  8. "description": "Insert an image to make a visual statement.",
  9. "keywords": [ "img", "photo", "picture" ],
  10. "textdomain": "default",
  11. "attributes": {
  12. "align": {
  13. "type": "string"
  14. },
  15. "url": {
  16. "type": "string",
  17. "source": "attribute",
  18. "selector": "img",
  19. "attribute": "src"
  20. },
  21. "alt": {
  22. "type": "string",
  23. "source": "attribute",
  24. "selector": "img",
  25. "attribute": "alt",
  26. "default": ""
  27. },
  28. "caption": {
  29. "type": "string",
  30. "source": "html",
  31. "selector": "figcaption"
  32. },
  33. "title": {
  34. "type": "string",
  35. "source": "attribute",
  36. "selector": "img",
  37. "attribute": "title"
  38. },
  39. "href": {
  40. "type": "string",
  41. "source": "attribute",
  42. "selector": "figure > a",
  43. "attribute": "href"
  44. },
  45. "rel": {
  46. "type": "string",
  47. "source": "attribute",
  48. "selector": "figure > a",
  49. "attribute": "rel"
  50. },
  51. "linkClass": {
  52. "type": "string",
  53. "source": "attribute",
  54. "selector": "figure > a",
  55. "attribute": "class"
  56. },
  57. "id": {
  58. "type": "number"
  59. },
  60. "width": {
  61. "type": "number"
  62. },
  63. "height": {
  64. "type": "number"
  65. },
  66. "sizeSlug": {
  67. "type": "string"
  68. },
  69. "linkDestination": {
  70. "type": "string"
  71. },
  72. "linkTarget": {
  73. "type": "string",
  74. "source": "attribute",
  75. "selector": "figure > a",
  76. "attribute": "target"
  77. }
  78. },
  79. "supports": {
  80. "anchor": true,
  81. "color": {
  82. "__experimentalDuotone": "img",
  83. "text": false,
  84. "background": false
  85. },
  86. "__experimentalBorder": {
  87. "radius": true,
  88. "__experimentalDefaultControls": {
  89. "radius": true
  90. }
  91. }
  92. },
  93. "styles": [
  94. {
  95. "name": "default",
  96. "label": "Default",
  97. "isDefault": true
  98. },
  99. { "name": "rounded", "label": "Rounded" }
  100. ],
  101. "editorStyle": "wp-block-image-editor",
  102. "style": "wp-block-image"
  103. }