# \#optimize-images

**URL:** https://forum.hhf.technology/tag/optimize-images/247.md

[Latest](https://forum.hhf.technology/latest.md) · [Categories](https://forum.hhf.technology/categories.md) · [Tags](https://forum.hhf.technology/tags.md)

---

## [Optimize images from a Node.js script](https://forum.hhf.technology/t/optimize-images-from-a-node-js-script/379)

<div class="topic-metadata">

**Author:** [@hhf.technoloy](https://forum.hhf.technology/u/hhf.technoloy)\
**Replies:** 0\
**Last updated:** [April 10, 2024, 4:48pm UTC](https://forum.hhf.technology/t/optimize-images-from-a-node-js-script/379 "2024-04-10T16:48:00Z")

</div>

I’ve been utilizing the sharp tool for image optimization.x\` import sharp from 'sharp' Here’s the method I employed to convert images to the webp format: await sharp('image.png') .webp({ lossless: true }) .toFile(…
