Skip to content
cccskills
FreePublished on GitHub

image-webp

Audit and convert images to WebP format. Checks public/assets/ for PNG/JPG files, verifies <img> tags have width/height, and generates cwebp conversion commands.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md1.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Image WebP Skill

Ensure all illustrations are WebP format and all <img> tags have proper attributes.

Step 1 — Find non-WebP images

find public/assets/illustrations/ -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" 2>/dev/null

For each file found:

  • Is it an OG image (og-.png, og-image.)? → Keep as PNG (Twitter/X requirement)
  • Otherwise → Convert to WebP

Step 2 — Generate conversion commands

For each non-OG image that needs conversion:

cwebp -q 85 -preset photo input.jpg -o output.webp

Check if cwebp is installed: which cwebp || brew install webp

Step 3 — Check img attributes

Grep all .astro files for <img tags missing width or height:

grep -n "<img" src/**/*.astro | grep -v "width" | grep -v "height"

Also check for missing alt attributes:

grep -n "<img" src/**/*.astro | grep -v 'alt='

Step 4 — Check Astro Image component usage

Astro has <Image> from astro:assets which handles optimization automatically. If raw <img> tags exist for static assets, suggest migrating to <Image> component.

Output Format

Non-WebP images found:
  public/assets/illustrations/hero-diagram.png (45KB) → Convert
  public/assets/og-image.png (120KB) → KEEP (OG image)

Conversion commands:
  cwebp -q 85 -preset photo public/assets/illustrations/hero-diagram.png -o public/assets/illustrations/hero-diagram.webp

img tags missing width/height:
  src/pages/index.astro:142 — <img src="/assets/diagram.webp" alt="..."> → Add width="800" height="400"

img tags missing alt:
  src/components/landing/Hero.astro:23 — <img src="..."> → Add descriptive alt text

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Validate all JSON-LD scripts in Astro pages — check parsability, @context, @type, and Layout.astro auto-inject compatibility.

The English summary is being prepared. Showing the original description.

rtk-ai/rtk-ldp10Updated Oct 16, 2026

Full SEO audit for rtk-ldp landing pages — JSON-LD schemas, OG tags, meta, robots, titles. Outputs a structured pass/fail checklist with score.

The English summary is being prepared. Showing the original description.

rtk-ai/rtk-ldp10Updated Oct 16, 2026

UI/UX design intelligence. 67 styles, 96 palettes, 57 font pairings, 25 charts, 13 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient. Integrations: shadcn/ui MCP for component search and examples.

The English summary is being prepared. Showing the original description.

rtk-ai/rtk-ldp10Updated Oct 16, 2026

See all skills by rtk-ai

Report a problem with this skill