| Crates.io | auto-thumbnail |
| lib.rs | auto-thumbnail |
| version | 0.1.2 |
| created_at | 2025-09-21 12:31:07.883063+00 |
| updated_at | 2025-09-25 07:23:20.907569+00 |
| description | Converts various file formats into thumbnail image. |
| homepage | https://github.com/siminx/auto-thumbnail |
| repository | https://github.com/siminx/auto-thumbnail |
| max_upload_size | |
| id | 1848789 |
| size | 76,045 |
Converts various file formats into thumbnail image.
Support image, video, PDF.
To use auto-thumbnail in your Rust project, add it to your Cargo.toml.
[dependencies]
auto-thumbnail = "0.1"
Create a thumbnail:
use auto_thumbnail::Thumbnailer;
let thumbnailer = Thumbnailer::default();
let result = thumbnailer.create_thumbnail("demo/1.webp", "demo/output1.webp");
Set compression quality 1-100, default 90.
Image
| extension | MIME type |
|---|---|
| jpg/jpeg | image/jpeg |
| png | image/png |
| gif | image/gif |
| bmp | image/bmp |
| tiff | image/tiff |
| webp | image/webp |
| tga | image/x-tga |
Video
| extension | MIME type |
|---|---|
| mp4 | video/mp4 |
| webm | video/webm |
| vob | video/mpeg |
| mov | video/quicktime |
| ogg | video/theora |
| flv | video/x-flv |
| wmv | video/x-ms-asf |
| avi | video/x-msvideo |
| mkv | application/x-matroska |
| swf | application/x-shockwave-flash |
| 3gp | video/3gpp |
| 3g2 | video/3gpp2 |
| extension | MIME type |
|---|---|
| application/pdf |
Some file types require additional setup and can be disabled via features if unneeded.
Video thumbnails depend on ffmpeg. See rust-ffmpeg
PDF thumbnails depend on pdfium. See pdfium-render