Image Upload

Convert local image uploads to WebP via a Next.js API route.

21|4|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/arunoda/OkBrain --skill image-upload-arunoda
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Image Upload
Source: https://github.com/arunoda/OkBrain/tree/main/.agent/skills/image_upload
Command: npx skills add https://github.com/arunoda/OkBrain --skill image-upload-arunoda

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of adding images to documents within the application, ensuring they are optimized for web display and seamlessly integrated into the editor.

Core Features & Use Cases

  • Local Image Upload: Allows users to upload images directly from their device for use in the document editor.
  • WebP Conversion: Automatically converts uploaded images (JPEG, PNG, GIF, etc.) to the efficient WebP format using sharp for faster loading and reduced file sizes.
  • Seamless Editor Integration: Integrates with the TipTap editor via slash commands, drag-and-drop, and paste functionality.
  • Use Case: When writing a new document, you can easily drag and drop a screenshot into the editor, and it will be automatically converted to WebP and embedded, ready for use.

Quick Start

Upload the image file 'diagram.png' into the document editor.

Frequently Asked Questions about Image Upload

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

FAQPage Schema
How do I convert local image uploads to WebP in a Next.js document editor?

This Skill handles local image uploads by processing files through the sharp library, automatically converting formats like JPEG, PNG, and GIF into optimized WebP images for faster loading and reduced file sizes in your Next.js document editor.

Can I add drag and drop image uploads to a TipTap editor?

Yes, you can add drag and drop image uploads to a TipTap editor. This Skill supports seamless integration via drag-and-drop, paste functionality, and slash commands to embed optimized images directly into your document.

How does sharp convert and serve optimized images through a Next.js API route?

Sharp converts and serves optimized images through a dedicated Next.js API route by intercepting local file uploads, transforming them into WebP format, and efficiently serving the reduced-size files back to the document editor for display.

What image formats are supported for WebP conversion in a TipTap document editor?

Supported image formats for WebP conversion in a TipTap document editor include JPEG, PNG, and GIF. The sharp library processes these uploaded local files and automatically converts them into the efficient WebP format.