Boost Web Performance: Compress Images with Tencent’s Zhitu Gulp Plugin

Zhitu, a Tencent front‑end tool, compresses PNG, JPEG, GIF images and automatically converts them to optimal formats like WebP; this guide shows how to manually upload images or integrate the gulp‑imageisux plugin into your build process to achieve significant size reductions while preserving visual quality.

Java High-Performance Architecture
Java High-Performance Architecture
Java High-Performance Architecture
Boost Web Performance: Compress Images with Tencent’s Zhitu Gulp Plugin

Zhitu is a platform developed by Tencent’s front‑end team for image compression and format conversion, supporting PNG, JPEG, GIF and automatically generating WebP versions.

Compressed images retain high visual quality while significantly reducing file size (e.g., a 156 KB image becomes 55 KB).

Zhitu can be used via manual upload at zhitu.isux.us or integrated into a build workflow with the gulp-imageisux plugin.

Using the Gulp Plugin

Install Gulp globally: npm install --global gulp Install the plugin globally: npm install --global gulp-imageisux Create a project structure, e.g.:

test/
│-- img/
│   └── test.jpg
└── gulpfile.js

Write gulpfile.js:

var gulp = require('gulp');
var imageisux = require('gulp-imageisux');

gulp.task('default', function () {
  return gulp.src(['img/*'])
    .pipe(imageisux('', true));
});

The imageisux function takes two arguments: the destination path for compressed images (empty string creates dest and webp folders) and a boolean indicating whether to generate WebP files.

Run the task in the project directory: gulp After execution, the img directory will contain two new folders, dest (compressed JPEG/PNG) and webp (converted WebP images).

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Frontend Optimizationimage compressionTencentgulp
Java High-Performance Architecture
Written by

Java High-Performance Architecture

Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.