n-image

Display images with preview, lazy loading, and error fallbacks.

8|3|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/jiaiyan/naive-ui-skills --skill n-image
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n-image
Source: https://github.com/jiaiyan/naive-ui-skills/tree/main/components/n-image
Command: npx skills add https://github.com/jiaiyan/naive-ui-skills --skill n-image

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Display images with built-in preview, lazy loading, and error handling to simplify image rendering and ensure a consistent user experience.

Core Features & Use Cases

  • Image Preview: Click to enlarge and preview single images.
  • Image Group / Galleries: Group images for gallery-style preview.
  • Lazy Loading: Load images only when they enter the viewport.
  • Error Handling: Fallback images and slots for custom error content.
  • Customization: Optional toolbar and preview options for flexible UI.

Quick Start

Create an n-image with a src prop to display an image and optionally enable preview, lazy loading, and an error fallback.

Frequently Asked Questions about n-image

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I display images with lazy loading and preview in a Vue dashboard?

Display images with lazy loading and preview by using an image component that loads sources only when entering the viewport and enables click-to-enlarge functionality. This simplifies rendering and ensures consistent loading performance in dashboards.

Can I show a fallback image when the original image fails to load?

Yes, you can show a fallback image when loading fails by using the fallback-src prop. This error handling mechanism ensures graceful fallbacks, and you can also use optional slots to render custom error content for your gallery.

How do I create a gallery-style preview for a group of images?

Create a gallery-style preview by grouping images together within the component interface. This allows users to click and navigate through enlarged images, providing a unified viewing experience for content lists.

Does naive-ui support image lazy loading inside content lists?

Naive-ui supports image lazy loading inside content lists through a dedicated image component. It defers rendering until images enter the viewport, optimizing page performance for long lists of images.

What props do I need to customize image rendering and toolbar options?

To customize image rendering, you need props such as src, width, height, alt, fallback-src, lazy, and preview-src. Optional slots and toolbar customization provide further flexible UI control.