Image Upload

premium

Image upload with preview and type/size validation.

Overview

The Image Upload is optimized for image files with a visual preview of the selected image. Validates file type and size like the file upload components.

Properties

PropertyTypeDefaultDescription
nameString"image"Field name used in form data.
labelString"Upload Image"Label displayed above the upload area.
acceptString"image/*"Accepted image types.
maxSizeNumber5Maximum file size in MB.
requiredBooleanfalseWhether an image must be uploaded.

Features

  • Image preview after selection
  • Optimized for image file types
  • File type and size validation
  • Drag-and-drop support

Tips

Defaults to accept="image/*" which allows all image formats (JPEG, PNG, GIF, WebP, etc.).
Use a specific accept value like ".jpg,.png" to restrict to certain formats.

Validation

This component uses file validation. See the Validation Guide for details on configuring rules and error messages.

Related components