Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
YouTube Security VideosfreeCodeCamp.org: TimescaleDB Course – PostgreSQL for Time-Series Data(23.09.2026 um 12:30 Uhr)
Windows Tipps & SecurityAndroid 17: Rollout auf Samsung-Galaxy-Smartphones verzögert sich(23.09.2026 um 11:42 Uhr)
Unix & Linux ServerUSN-8733-2: Gzip vulnerabilities(22.09.2026 um 18:04 Uhr)
Sichere ProgrammierungHow to Build Custom PowerPoint Add-Ins for Enterprise Teams(23.09.2026 um 11:25 Uhr)
Sichere ProgrammierungSearch Google Jobs in Real-Time with Go and SerpApi 🚀(23.09.2026 um 12:13 Uhr)
Sichere ProgrammierungA Psychological State is a Coefficient Vector(23.09.2026 um 12:16 Uhr)
YouTube Security VideosfreeCodeCamp.org: TimescaleDB Course – PostgreSQL for Time-Series Data(23.09.2026 um 12:30 Uhr)
Windows Tipps & SecurityAndroid 17: Rollout auf Samsung-Galaxy-Smartphones verzögert sich(23.09.2026 um 11:42 Uhr)
Unix & Linux ServerUSN-8733-2: Gzip vulnerabilities(22.09.2026 um 18:04 Uhr)
Sichere ProgrammierungHow to Build Custom PowerPoint Add-Ins for Enterprise Teams(23.09.2026 um 11:25 Uhr)
Sichere ProgrammierungSearch Google Jobs in Real-Time with Go and SerpApi 🚀(23.09.2026 um 12:13 Uhr)
Sichere ProgrammierungA Psychological State is a Coefficient Vector(23.09.2026 um 12:16 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

I built a Node.js image engine in Rust to fix Sharp's deployment headaches

The "Dependency Hell" of Image Processing If you've ever deployed a Node.js app that uses sharp to AWS Lambda or Alpine Linux, you know the pain. "Error: 'vips/vips8' not found" "Error: libvips.so.42: cannot open shared object…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




The "Dependency Hell" of Image Processing



If you've ever deployed a Node.js app that uses sharp to AWS Lambda or Alpine Linux, you know the pain.




"Error: 'vips/vips8' not found"

"Error: libvips.so.42: cannot open shared object file"




sharp is an incredible library—it's fast and the industry standard. But it relies on libvips, a C++ library that often requires complex OS-level dependencies (apt-get install, dynamic linking, etc.). This makes "Write once, run anywhere" feel like a lie when you move from macOS to Linux production environments.



So, I decided to fix it using Rust.






Meet lazy-image 🦀



I built lazy-image, a next-generation image processing engine for Node.js.



It is powered by Rust (via NAPI-RS) and uses statically linked binaries. This means:





  • Zero System Dependencies: No libvips installation needed. No apt-get. No LD_LIBRARY_PATH. Just npm install.


  • Memory Safety: The core logic is written in Rust, protecting your server from memory corruption bugs common in C/C++ libraries when processing user uploads.


  • Smaller Binaries: Instead of downloading a massive dependency chain, it uses platform-specific packages (~6-9MB).






Performance: Is it actually fast?



Yes. In fact, for many web-optimization tasks, it beats the competition.



Here is a benchmark result comparing lazy-image vs sharp (using mozjpeg + libvips):
































Format lazy-image sharp Difference
JPEG Size 15,790 bytes 17,495 bytes
-9.7% Smaller
Pipeline Speed 193ms 273ms
1.41x Faster
PNG → AVIF 4,773ms 11,652ms
2.44x Faster


(Tested with 66MB PNG input, resized to 800px)






Why is it smaller?



I integrated mozjpeg by default, which uses advanced trellis quantization and scan optimization to shave off file size without losing visual quality.






Why is it faster?



For format conversions (like PNG to WebP) without resizing, lazy-image uses a Copy-on-Write (CoW) architecture. It avoids intermediate buffer allocations, making it significantly more memory-efficient and faster for batch processing pipelines.






How to use it



It's designed to be a drop-in replacement for your current workflow.






Installation






npm install @alberteinshutoin/lazy-image






Basic Usage





const { ImageEngine } = require('@alberteinshutoin/lazy-image');

// Memory-Efficient: Reads directly from file (bypassing Node.js heap)
await ImageEngine.fromPath('input.png')
.resize(800) // Resize to 800px width (auto height)
.rotate(90) // Rotate
.grayscale() // Apply filter
.toFile('output.jpg', 'jpeg', 85);






Batch Processing

You can even process multiple images in parallel with a single engine definition:





const engine = ImageEngine.fromPath('template.jpg')
.resize(800)
.webp();

// Uses all CPU cores by default
await engine.processBatch(['img1.jpg', 'img2.jpg'], './output', 'webp');






Give it a try!

I built lazy-image to solve my own deployment headaches, but I think it can help many of you who are tired of wrestling with C++ dependencies in Node.js.



It supports JPEG, PNG, WebP, and AVIF.



Check it out on GitHub, and let me know what you think! I'm looking for feedback on the Rust/NAPI implementation.



👉 GitHub: https://github.com/albert-einshutoin/lazy-image

📦 npm: https://www.npmjs.com/package/@alberteinshutoin/lazy-image






node #rust #javascript #webdev

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten I built a Node.js image engine in Rust to fix Sharp's deployment headaches

Thematisch verwandte Begriffe: built, Nodejs, image, engine · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-19438 | Improper Limitation of a Pathname to a Restricted Directory ('Path Trave…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick