hyva-themes avatar

Hyva Render Media Image

This generates responsive picture elements for Hyvä Theme templates using the Media view model. You'll use it when adding hero images, product images, or any responsive image that needs different sources for mobile and desktop breakpoints. It handles the boilerplate for lazy loading, eager loading for LCP images, and the picture element syntax. The workflow is straightforward: either pass literal image paths and dimensions, or provide a PHP variable with image data following Hyvä's array structure. Honest take: if you're building Hyvä templates and tired of writing the same responsive image markup repeatedly, this will save you time and keep your Core Web Vitals optimization consistent.

skills.sh installs
1.3K
GitHub stars
85
last updated
Aug 21, 2026

Install

$ npx -y skills add hyva-themes/hyva-ai-tools --skill hyva-render-media-image --agent claude-code

Installs into .claude/skills of the current project.

Files

Hyvä Render Image

Generate responsive <picture> elements for Hyvä Theme templates using the \Hyva\Theme\ViewModel\Media view model.

When to Use

  • Adding images to Hyvä PHTML templates
  • Creating responsive images with different sources for mobile/desktop
  • Implementing hero banners, product images, or CMS content images
  • Optimizing images for Core Web Vitals (LCP, CLS)

Workflow

1. Gather Image Requirements

The user may provide image data in one of these ways:

Option A: Direct values - Ask the user for:

  1. Image path(s) - Location in pub/media/ (e.g., wysiwyg/hero.jpg, catalog/product/...)
  2. Image dimensions - Width and height in pixels
  3. Responsive requirements - Different images for mobile vs desktop?
  4. Image purpose - Hero/LCP image (eager loading) or below-fold (lazy loading)?
  5. Alt text - Meaningful description for accessibility

Option B: PHP variable - The user provides a variable name (e.g., $imageData, $heroImage). Inform the user of the required array structure documented in references/rendering-images.md under ## Image Configuration Format.

2. Generate the Code

Sponsors

Details

Repository
github.com/hyva-themes/hyva-ai-tools
Categories
Frontend Development, AI & Agent Building, Mobile Development
First seen
Jun 3, 2026

More from hyva-themes/hyva-ai-tools

All 12
1joeseesun avatardefuddlejoeseesun/defuddle-skillExtract clean article content from web pages or local HTML files. Removes clutter (ads, sidebars, nav) and returns readable content with metadata.1.3Kskills.sh installs
2cap-go avatarcapacitor-accessibilitycap-go/capgo-skillsAccessibility guide for Capacitor apps covering screen readers, semantic HTML, focus management, and WCAG compliance. Use this skill when users need to make the1.3Kskills.sh installs
3kostja94 avatarhero-generatorkostja94/marketing-skillsWhen the user wants to design, optimize, or audit hero sections (above-the-fold main visual area). Also use when the user mentions "hero," "hero section," "hero1.3Kskills.sh installs
4neolabhq avatartest-promptneolabhq/context-engineering-kitUse when creating or editing any prompt (commands, hooks, skills, subagent instructions) to verify it produces desired behavior - applies RED-GREEN-REFACTOR cyc1.3Kskills.sh installs
5jezweb avatargoogle-chat-messagesjezweb/claude-skillsSend Google Chat messages via incoming webhooks — text, rich cards (cardsV2), threaded replies. TypeScript types, card builder utility, widget reference inline.1.3Kskills.sh installs
6capawesome-team avatarcapawesome-cloudcapawesome-team/skillsGuides the agent through setting up and using Capawesome Cloud for Capacitor and Cordova apps. Covers three core workflows: (1) Native Builds — cloud builds for1.3Kskills.sh installs