{"id":261087,"date":"2025-12-16T23:37:27","date_gmt":"2025-12-16T23:37:27","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/theme-image-block\/"},"modified":"2026-02-20T18:05:53","modified_gmt":"2026-02-20T18:05:53","slug":"theme-image-block","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/theme-image-block\/","author":15605205,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.1","stable_tag":"1.1.1","tested":"6.9.4","requires":"6.8","requires_php":"7.4","requires_plugins":null,"header_name":"Theme Image Block","header_author":"Happy Prime","header_description":"Use images from your theme as blocks in content.","assets_banners_color":"","last_updated":"2026-02-20 18:05:53","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/happyprime.co","rating":0,"author_block_rating":0,"active_installs":0,"downloads":218,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.1.0":{"tag":"1.1.0","author":"happyprime","date":"2025-12-18 20:26:38"},"1.1.1":{"tag":"1.1.1","author":"happyprime","date":"2026-02-20 18:05:53"}},"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":{"happyprime\/theme-image":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"happyprime\/theme-image","version":"0.1.0","title":"Theme Image","category":"media","icon":"format-image","description":"Display an image from the theme's images directory.","supports":{"anchor":true,"align":true,"color":{"text":true,"background":true},"spacing":{"margin":true,"padding":true}},"attributes":{"themeImage":{"type":"string","default":""},"imageSize":{"type":"string","default":"original"},"imageStyle":{"type":"string","default":""},"inlineSVG":{"type":"boolean","default":false},"linkUrl":{"type":"string","default":""},"linkTarget":{"type":"string","default":""},"linkRel":{"type":"string","default":""},"caption":{"type":"string","default":""},"showCaption":{"type":"boolean","default":false},"altText":{"type":"string","default":""},"omitAltText":{"type":"boolean","default":false}},"textdomain":"theme-image-block","editorScript":"file:..\/..\/build\/theme-image\/index.js","style":"file:.\/style.css"}},"tagged_versions":["1.1.0","1.1.1"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[163,84],"plugin_category":[50],"plugin_contributors":[208741,80671,209288,209287],"plugin_business_model":[],"class_list":["post-261087","plugin","type-plugin","status-publish","hentry","plugin_tags-images","plugin_tags-media","plugin_category-media","plugin_contributors-happyprime","plugin_contributors-jeremyfelt","plugin_contributors-philcable","plugin_contributors-slocker","plugin_committers-happyprime","plugin_committers-jeremyfelt"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/theme-image-block.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>The Theme Image Block plugin allows you to register images from your theme and make them available as blocks in the WordPress editor. This is useful for logos, icons, and other images that are part of your theme's design system.<\/p>\n\n<h3>Usage<\/h3>\n\n<h3>Registering Theme Images<\/h3>\n\n<p>Theme images should be registered using <code>HappyPrime\\ThemeImageBlock\\register_theme_image()<\/code>. This is likely best done on the <code>init<\/code> or <code>after_setup_theme<\/code> action.<\/p>\n\n<pre><code>HappyPrime\\ThemeImageBlock\\register_theme_image(\n    'happy-prime-logo',\n    [\n        'title' =&gt; 'Happy Prime Logo',\n        'description' =&gt; 'The Happy Prime logo.',\n        'alt' =&gt; 'Happy Prime',\n        'path' =&gt; 'images\/happy-prime-logo.svg',\n        'width' =&gt; '300',\n        'height' =&gt; '',\n        'variations' =&gt; [\n            'small' =&gt; [\n                'path'   =&gt; 'images\/happy-prime-logo-small.svg',\n                'width'  =&gt; '100',\n                'height' =&gt; '100',\n            ],\n            'medium' =&gt; [\n                'path'   =&gt; 'images\/happy-prime-logo-medium.svg',\n                'width'  =&gt; '200',\n                'height' =&gt; '200',\n            ],\n            'large' =&gt; [\n                'path'   =&gt; 'images\/happy-prime-logo-large.svg',\n                'width'  =&gt; '300',\n                'height' =&gt; '300',\n            ],\n        ],\n        'sizes' =&gt; '(max-width: 600px) 100vw, 300px',\n    ]\n);\n<\/code><\/pre>\n\n<h3>Registering Theme Image Styles<\/h3>\n\n<p>Theme image styles should be registered using <code>HappyPrime\\ThemeImageBlock\\register_theme_image_style()<\/code>. This is likely best done on the <code>init<\/code> or <code>after_setup_theme<\/code> action.<\/p>\n\n<pre><code>HappyPrime\\ThemeImageBlock\\register_theme_image_style(\n    'hero',\n    [\n        'name'   =&gt; 'Hero',\n        'width'  =&gt; 'clamp(10rem, 100vw, 60rem)',\n        'height' =&gt; 'auto',\n    ]\n);\n<\/code><\/pre>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate the plugin.<\/li>\n<li>Register theme images using the <code>register_theme_image()<\/code> function.<\/li>\n<li>Register theme image styles using the <code>register_theme_image_style()<\/code> function.<\/li>\n<li>Use the Theme Image block in the editor to insert registered images.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h3>1.1.1<\/h3>\n\n<ul>\n<li>Prevent fatal error on activation.<\/li>\n<li>Improve HTML processing when rendering output.<\/li>\n<li>Fix reference to renamed global JavaScript variable.<\/li>\n<li>Fix textdomain mismatch.<\/li>\n<li>Improve support for multiple theme image blocks in one editor view.<\/li>\n<\/ul>\n\n<h3>1.1.0<\/h3>\n\n<ul>\n<li>Initial release on wp.org.<\/li>\n<\/ul>\n\n<h3>1.0.0<\/h3>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Use images from your theme as blocks in content.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/261087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=261087"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/happyprime"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=261087"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=261087"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=261087"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=261087"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=261087"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=261087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}