What this solution does
The Ezhi WebP module for 1C-Bitrix automatically converts site images from JPEG and PNG formats to WebP. This reduces file size without noticeable quality loss, speeds up page loading, and lowers traffic and disk space consumption.
The degree of compression depends on the source files. For example, in a demo catalog containing 62 photos, the total size decreased from 12.6 MB to 7.2 MB, a reduction of 43%, with WebP quality set to 85.
Automatic conversion for new images
When adding a product, news item, or article, the module immediately converts the preview image, detailed image, and files in properties to WebP. No additional clicks are required, and the content manager's workflow remains unchanged.
Mass conversion of existing images (new in version 1.5.0)
For sites with hundreds or thousands of photos, manual re-uploading is unnecessary. The process is performed in a few steps:
1. Select the required information blocks. The module will display the number of images and their total weight in advance.
2. Click the "Convert" button and monitor the progress. The process can be paused at any time.
The module processes preview and detailed images, galleries, files in other properties, section images, and images embedded directly within article text.
The module converts images to WEBP format without altering the structure of information blocks. Files remain in their original locations, and the order of photos and their captions remains unchanged. Original images are kept on the disk, ensuring that old links continue to work and allowing any conversion run to be reverted with a single button. After verifying correct operation, the module removes the originals to free up space. Before deletion, it checks links for every file in information blocks, though it does not check templates or CSS files. The 'History' tab displays statistics for each run, including the number of processed files and the amount of space saved.
A separate page in the admin panel allows for manual uploads. Drag and drop several JPG or PNG files to generate ready-to-use WEBP images in the /upload/optimizer/ directory. This page also shows details for each compressed file, with options to delete originals or clear the entire folder.
The module operates carefully regarding the site: it does not touch SVG, GIF, or existing WEBP files. Images that are too large for the server's memory are skipped without causing errors on the site. Photos uploaded from mobile devices retain their correct orientation and are not rotated sideways. Users can set a maximum side length; oversized photos will be resized to this limit.
All processes run on your server using the standard GD library, which is available on most hosting providers. No external services are required, and data is never sent elsewhere.
The work log can be enabled optionally and is stored in the protected folder /bitrix/backup/.
Key points
Images of information block elements and files uploaded manually via the interface are automatically converted upon upload. Images of sections, HL-blocks, and forms are not converted during upload; existing images of information blocks and sections are processed in batch mode.
Batch processing runs only while the browser tab remains open. If the tab is closed, the process can be resumed later using the "Resume Start" button.
Before starting batch processing, create a backup of the database.
Exports and feeds (Yandex, marketplaces, 1C) will begin serving files in WebP format; ensure the receiving side supports this format.
Testing was performed on 1C-Bitrix 26.150 with PHP 8.2, MySQL 8.0, and PostgreSQL 16.
When needed, General iT can implement “Simple JPEG/PNG to WEBP optimization”, configure the module and verify it against the current website setup.