Performance v1.0.4

CTW Image Optimizer PRO – AVIF, WebP, lazy loading and PageSpeed

A one-click wizard converts shop images to AVIF and WebP, adds lazy loading and missing image dimensions, then shows your Google PageSpeed result before and after. Image URLs, the theme and the originals stay untouched.

About the module

Images are usually the largest part of every shop page, and PageSpeed has given the same advice for years: next-gen formats, deferred loading for images below the fold, and dimensions that stop the page from jumping. CTW Image Optimizer PRO does all three in one module and shows the effect in numbers.

The module creates AVIF and WebP copies next to every image (e.g. 1-home_default.jpg.avif and .webp) and serves the best format the browser supports: AVIF, then WebP, then the original. AVIF is typically 20–30% smaller than WebP. It adds lazy loading, decoding="async" and missing width and height attributes to the shop HTML. On the PrestaShop demo shop, image weight dropped from 7.44 MB to 1.87 MB with AVIF (75% less) and to 2.40 MB with WebP.

How it works

  • Install the module. If you have the Basic version, PRO disables it automatically and takes over its rules.
  • Run the "Optimize my shop" wizard: five steps, one click, with a conversion progress bar and a before/after size bar.
  • Compare the Google PageSpeed result (score, LCP, CLS, page weight) and image weight on the home, category and product pages before and after.
  • Set up cron (URL or CLI) so new thumbnails, categories and imports are optimized automatically. New product images are converted right after upload.

Who it's for

  • Shops that care about PageSpeed and Core Web Vitals (LCP, CLS).
  • Non-technical shop owners: the wizard guides you step by step, and messages are written in plain language.
  • Large catalogs: conversion runs in batches of about 8 seconds and resumes after interruption, tested on about 20,000 images.
  • Agencies that want to show clients a before-and-after result in numbers.

Requirements and limitations

AVIF requires PHP 8.1+ with GD compiled with libavif, or ImageMagick 7 with the AVIF coder. The module checks this itself, and without AVIF it works with WebP, which delivers most of the gain. PageSpeed measurement requires a publicly accessible shop (not localhost, not maintenance mode); for frequent measurements, add a free Google PageSpeed API key. On nginx-only servers the serving rules must be added manually; a ready configuration snippet is in the panel. The module does not resize images, compress original JPGs or rewrite URLs to a CDN.

What it solves

  • Low PageSpeed score because of images

    Google flags next-gen formats, deferred loading and missing dimensions, and each of these fixes is separate work in the theme.

  • The page jumps while loading

    Images without width and height shift the content, which hurts CLS and annoys customers on phones.

  • WebP is not the whole story

    AVIF is typically 20–30% smaller than WebP, but it has to be generated, the server has to support it, and it must only be served to browsers that understand it.

  • Optimization takes technical know-how

    Conversion, server rules, lazy loading and measurement mean several tools and plenty of configuration that shop owners have no time for.

  • No proof that it works

    Without a before-and-after measurement it is hard to judge the effect or show it to a client or your boss.

Key features

  • “Optimize my shop” wizard

    Five steps and one click: server check, “before” measurement, enabling AVIF, WebP and lazy loading, image conversion and “after” measurement. A conversion progress bar and a before/after size bar show what is happening.

  • AVIF and WebP with automatic selection

    AVIF and WebP copies next to the originals, and each browser gets the best format it supports: AVIF, then WebP, then the original. Image URLs and the theme stay the same, and the Vary: Accept header protects caches and CDNs.

  • Lazy loading and missing dimensions

    Images below the fold load only when scrolled to, get decoding=“async” and missing width and height, so the page doesn't jump and CLS improves. No template changes.

  • Google PageSpeed before and after

    Score, LCP, CLS and page weight before and after optimization. The “before” measurement works on an already optimized shop too: the module briefly turns optimization off and restores it automatically after 5 minutes.

  • Image weight on shop pages

    How much images weigh on the home, category and product pages as originals, AVIF and WebP, plus a list of images without lazy loading or dimensions.

  • Faster on large catalogs

    An option to skip original product images the shop never displays makes conversion roughly twice as fast and saves disk space. Conversion runs in batches and resumes after interruption.

  • AVIF diagnostics in plain language

    The module checks AVIF with a real encoding test. If the server can't do it, you see a simple message with the estimated gain in MB, technical details are collapsed for the administrator, and “Check again” verifies the server after changes.

  • Everything from the Basic version

    Savings dashboard with results per image type, conversion of new images right after upload, cron via URL and CLI (also in maintenance mode), one-click serving test, ready nginx configuration and maintenance tools.

  • Originals are never modified

    The module only adds .avif and .webp files. Re-optimization always starts from the original, and a new file replaces the old one only once it is fully written.

Frequently asked questions

Which PrestaShop versions are supported?

PrestaShop 1.7 through 9.x, on PHP 5.6 to 8.4. AVIF requires PHP 8.1 or newer.

When does AVIF work?

When PHP has GD compiled with libavif (PHP 8.1+) or ImageMagick 7 with the AVIF coder; the PHP version alone is not enough. The module checks this on install and in the panel. Without AVIF it works with WebP, which delivers most of the gain.

Does the module change my original images or theme?

No. It creates .avif and .webp files next to the original, and image URLs and templates stay unchanged. Lazy loading and dimensions are added to the HTML on the fly.

I have the Basic version. What happens to it?

After installation PRO automatically disables Basic and takes over serving. Existing WebP files are kept; PRO only adds AVIF.

Why doesn't PageSpeed measure?

The shop must be publicly accessible, not on localhost and not in maintenance mode. Without your own API key Google often rejects requests because of a shared daily limit, so you can paste a free Google PageSpeed API key in the advanced settings.

What about a very large number of images?

Conversion runs in batches of about 8 seconds with no risk of timeouts. Progress is saved in the database, so after closing the tab the module continues where it stopped, and cron does the same work in the background. Tested on about 20,000 images.

Does it work in maintenance mode and on nginx?

In maintenance mode the panel, conversion, serving and cron work normally. On Apache it works out of the box; on nginx alone, add the configuration snippet from the panel.

What does the license include?

A one-time purchase for one production domain, unlimited test domains, and 12 months of updates and support. After that the module keeps working, just without new versions.

Compatibility and terms

Compatibility
PS 1.7 – 9.x
PHP
5.6+
PrestaShop
1.7 – 9.x
PHP
5.6 – 8.4 (AVIF: 8.1+)
Formats
AVIF, WebP
Server
Apache (.htaccess) or nginx
Support
12 months
License type
One-time purchase, 1 domain, 12 months of updates
Built for
PrestaShop 1.7–9.x shops, agencies

Contact form

Regarding module: CTW Image Optimizer PRO – AVIF, WebP, lazy loading and PageSpeed