plugin-icon

Theme Image Block

제작자: Happy Prime·
Use images from your theme as blocks in content.
버전
1.1.1
최근 업데이트일
Feb 20, 2026

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.

Usage

Registering Theme Images

Theme images should be registered using HappyPrime\ThemeImageBlock\register_theme_image(). This is likely best done on the init or after_setup_theme action.

HappyPrime\ThemeImageBlock\register_theme_image( 'happy-prime-logo', [ 'title' => 'Happy Prime Logo', 'description' => 'The Happy Prime logo.', 'alt' => 'Happy Prime', 'path' => 'images/happy-prime-logo.svg', 'width' => '300', 'height' => '', 'variations' => [ 'small' => [ 'path' => 'images/happy-prime-logo-small.svg', 'width' => '100', 'height' => '100', ], 'medium' => [ 'path' => 'images/happy-prime-logo-medium.svg', 'width' => '200', 'height' => '200', ], 'large' => [ 'path' => 'images/happy-prime-logo-large.svg', 'width' => '300', 'height' => '300', ], ], 'sizes' => '(max-width: 600px) 100vw, 300px', ] );

Registering Theme Image Styles

Theme image styles should be registered using HappyPrime\ThemeImageBlock\register_theme_image_style(). This is likely best done on the init or after_setup_theme action.

HappyPrime\ThemeImageBlock\register_theme_image_style( 'hero', [ 'name' => 'Hero', 'width' => 'clamp(10rem, 100vw, 60rem)', 'height' => 'auto', ] );
무료유료 요금제에서
설치하면 WordPress.com 서비스 약관서드파티 플러그인 약관에 동의하게 됩니다.
테스트된 버전
WordPress 6.9.4
이 플러그인은 다운로드할 수 있으며 에서 사용할 수 있습니다.