Version 1.0.11
Animated GIFs are converted to animated WebP. This format has much to offer: a test banner weighs 9.62 MB in GIF and 1.75 MB in WebP with the same animation — measured on client hosting. The copy remains an image, so it travels the same path as the rest and is served through the same wrapper, while the original GIF remains a fallback option.
Imagick is required: only it can read all frames, so on servers without it, GIFs are simply skipped. Animations are queued last and are not processed while a visitor waits for a response. A separate background run has been added for them on the "Queue" screen — one animation takes as long to prepare as a hundred ordinary images, and in a general run they would interfere with each other. The default limit for the source file size has been raised from 8 to 12 MB: this was the threshold that filtered out such banners.
A checkbox "Serve WebP directly, without picture wrapper" has appeared. Standard delivery wraps the image in a picture tag so that browsers without format support receive the original, but this places the image one level deeper in the markup — and on some templates styles like ".card > img" and gallery or slider scripts that search for the image via the parent stop working. With the checkbox enabled, the copy address is inserted directly into src, and the markup remains unchanged. Backgrounds in styles were always served directly, so enabling the checkbox brings all delivery to a uniform appearance. The copy is offered only to browsers that declare support for the format.
Fixed: background substitution could corrupt the markup. If the address in the style was written with escaped quotes, after substitution they returned as real quotes and broke the attribute — the element lost its background. Now the value is encoded back, and the result is verified against the intended one on the finished page.
Fixed: copy preparation could break the page. Limits in settings contradicted each other — an image of 40 megapixels requires more memory than the module is allowed.
Memory shortage causes the entire page to be interrupted. Now the requirement is calculated before work begins and verified against what is actually available to the process.
Fixed: after editing the script file, the site continued to serve the old compressed copy. The copy was selected by file address rather than content, so the corrected script was never rebuilt. Now file size and time determine whether a copy is valid, and an edit triggers a rebuild.
Fixed: Bitrix script addresses were being replaced. This broke the core rule "one address, one load" during component loading and left outdated copies of service builds. Such files are now left untouched.
Fixed: on the module settings screen, some numeric limits were wider than the operational range. It was possible to specify, for example, 50 tasks per background agent run, although no more than ten are actually taken—the number was saved and silently truncated. Now the upper limits on the screen match what the module actually enforces, and values saved by a previous version above the new limit are displayed within the allowable range.
Strengthened following pre-release verification. Animation is assembled in a temporary directory whose name cannot be predicted externally; on shared hosting this protects against file substitution by a neighboring server user. The check for whether frames will fit is no longer disabled on servers where ImageMagick limits are not set: previously, a specially prepared GIF could occupy the server for a long time on such servers. Additionally, GIFs are read not in full but within the allowed size limit, and a non-standard memory_limit value no longer causes an error in the middle of conversion.
Large catalogs are processed many times faster. The queue was replenished only by the background agent — no more than ten tasks per minute and only while someone was on the site — so the CLI worker, capable of processing a hundred tasks in one pass, was idle waiting for a queue that was being filled at a rate of ten. Now the queue is replenished by the same component that processes it, and the worker takes the site settings,
not its own defaults. On the "Queue" screen, a "Scheduled Run" block appeared with a ready line for the scheduler: containing paths to your site and the PHP on which the site runs. The line can be run in multiple threads—the task is assigned to exactly one. Measurement: 25 images in 3.8 seconds with one thread versus three per minute with the agent.
Fixed: a run through the catalog could not redo what had once been rejected. Upon re-queuing, the queue returned an existing task in any state, including one completed in vain, so the catalog run would proceed, report, and place nothing. Installing Imagick, raising the size limit, or restarting the run never helped. Now, a completed task for a file without a copy is returned to work.
Fixed: a long conversion was taken from the one performing it. Task lease lasted a minute, but converting a large animation takes longer, and the cleaner of stuck tasks would transfer it to another—the work was discarded and restarted, three times, after which the file was deemed non-convertible. The lease now survives the entire pass.
Fixed: animations were not written on hosting where the site is locked in its own directory (open_basedir). The system temporary directory is unavailable there, and the copy was written exactly there. Now writing goes to the temporary folder of the CMS itself within the site.
Fixed: images with spaces and Cyrillic in the name were not optimized at all. The address arrives encoded, while on disk the name is plain—the file was searched under a name that does not exist, and the miss appeared as an attempt to go outside the site.
Fixed: a server with configured ImageMagick is no longer downgraded by the module. Previously the module lowered its limits to its own, and on a server where a gigabyte of memory is allowed, this loaded the disk layer instead of offloading it: an animation with 204 frames hit the disk limit. The module now sets its own numbers only where the build has none, and knows how to raise them; upon hitting someone else's ceiling, it refuses once and reports the numbers.
Fixed: the run progress counter was calculating incorrectly. Both runs were reading all images sequentially, and the 'total' count was only based on its own type — a site with forty animations among five hundred images displayed '116 of 40' and continued to grow, which appeared as a hung run.
Fixed: animations were left without copies when the direct delivery checkbox was enabled. The logic excluded them entirely — GIFs in this mode have no fallback option — and copies were built but never reached anyone. Now, regular images go directly to src, while animations receive a picture wrapper: it appears only around them.
The default copy size limit has been raised from 8 to 12 MB — to the same value as the source limit. Since a copy is only saved if it is smaller than the original, a separate smaller limit would discard already completed work.
Minor: the module version on screens is now taken from the running code, not from the installer record, which remained unchanged after an update; the worker, having emptied the queue, continues to write instead of reporting a limit hit.
Fixed: attributes written with single quotes or without quotes were read as empty. Such images and scripts were simply invisible to the module — not compressed, not deferred, not measured. Nothing broke, so it went unnoticed: on a template structured this way, the module silently did nothing.
A checkbox for 'Scheduled Queue Processor' has been added to the settings screen. Previously, the 'Queue' screen displayed a line for the scheduler and indicated that the processor needed to be enabled, but there was no place to enable it.