What this solution does
This module optimizes image display on websites by creating WebP copies of source files. It reduces file weight by 2–3 times compared to the original, and by tens of times in cases where heavy source formats are used. Reducing image size directly contributes to faster page loading and improved search engine rankings. The tool supports responsive design by generating HTML code for the picture tag, accounting for screen density and various display sizes, which reduces data transfer for mobile devices. Compatibility is ensured across all browsers: modern clients use WebP, while older browsers automatically receive the original image. Additionally, the module allows resizing images and adding schema.org microdata. The solution is compatible with any version of 1C-Bitrix supporting D7 and works with any PHP version.
This module requires the PHP GD library to be installed. It is enabled by default on most hosting environments.
The tool accepts images in various input formats:
Local links relative to the site root.
Absolute links, including files located outside the server's document root, provided they are accessible to PHP.
Relative links relative to the path of the calling PHP script.
File IDs from the registered files table in 1C-Bitrix.
File description arrays, such as $arResult['PREVIEW_PICTURE'] or the array returned by the \CFile::GetFileArray() method.
Arrays returned by the \CFile::ResizeImageGet() method.
The module supports converting images to any format supported by the installed version of the GD library. It features proportional resizing where specifying only the width or only the height is sufficient to adjust the dimensions. When creating a new file, the original filename is preserved.
The module converts images to WEBP format with single-pass processing. The result is cached and reused until the source file changes. When the original is updated, the system automatically regenerates the output. An option exists to output the source image without conversion or resizing. The module automatically generates the picture tag for responsive layouts. It supports selecting images based on screen resolution via media queries. Device pixel density is accounted for to automatically choose the optimal image variant. Support for schema.org/ImageObject microdata is implemented.
General iT can connect “Image converter to WEBP”, install and configure the module, and make sure the integration works correctly.