Google PageSpeed Optimizer for Magento 2

View Demo

Google PageSpeed Optimizer speeds up Magento 2 for Core Web Vitals: it bundles and delays JavaScript, applies critical CSS per page type, converts images to WebP and lazy-loads them without delaying the main image.

Built-in PageSpeed Insights monitoring shows how each change affects the desktop and mobile score of your pages. Works with Luma and Hyvä themes.

  • Delay GTM and chat scripts until interaction
  • Critical CSS per page type
  • JS bundling, minification and deferral
  • Image compression and WebP conversion
  • Lazy loading that keeps the main image first
  • Built-in PageSpeed monitoring
Hyvä
Magento Cloud
Mage-OS
Compatible with:
Community:
2.3.* - 2.4.9
Enterprise:
2.3.* - 2.4.9

Business Value

Google PageSpeed Optimizer is one Magento 2 speed optimization extension for JavaScript, CSS, HTML and images, with PageSpeed Insights monitoring built into the admin. Its settings map to Core Web Vitals: critical CSS, image preload and lazy loading that keeps the main image first work on Largest Contentful Paint (LCP), while delayed third-party scripts and JS bundling cut the main-thread work behind Total Blocking Time and Interaction to Next Paint (INP).

  • Opportunity: Google uses Core Web Vitals as one of its ranking signals, and PageSpeed Insights shows how each page of your store scores on them.
  • Problem: A default Magento store loads its JavaScript in the page head, third-party tags such as Google Tag Manager and chat widgets compete with the first screen, and images go out as full-size JPEG and PNG files. PageSpeed Insights reports this as render-blocking resources, long Total Blocking Time and "Improve image delivery". Check your store in PageSpeed Insights.
  • Solution: The extension handles these causes from one admin section. It bundles only the JavaScript each page type uses, delays third-party scripts until the visitor interacts, applies critical CSS per page type, converts images to WebP and keeps the most important image out of lazy loading. It works with Luma and Hyvä themes, Mage-OS and Magento Cloud.

How does Magento 2 Speed Optimization work?

The extension works on four fronts. It reduces and reorders JavaScript and CSS so the first screen renders sooner, compresses images and serves them as WebP, loads offscreen images and videos only when visitors reach them, and tracks your PageSpeed score so you can see the effect of every change.

Each option is switched on separately, so you can roll changes out one at a time and check the result before the next step.

Performance Optimization of JavaScript and CSS

Advanced JavaScript bundling
Speed up JS code loading

Advanced JavaScript bundling

On themes built on RequireJS, such as Luma, Magento loads many separate JavaScript files on every page, including code that page never uses.

JavaScript Optimization builds bundles from the files each page type actually requests on your storefront. A product page gets the scripts product pages need, a category page gets its own set, and code shared by most pages goes into a common bundle. As a result, every page loads fewer and smaller JS files.

Checkout is excluded from bundling by default, and you can exclude any other page. A pre-flight check runs before you turn the option on. If you want fewer HTTP requests on top of the bundles, Merge JavaScript files is available in the same section.

Hold third-party scripts

Delay JavaScript until user interaction

Google Tag Manager, chat widgets, analytics and review widgets can take a large share of main-thread time, yet none of them has to run before the visitor does anything.

The extension holds the scripts you choose until the first interaction (a tap, click, key press, scroll or mouse move) or until an optional timeout. This lowers Total Blocking Time without removing any functionality.

You decide what to delay with include and exclude patterns, and Dry Run mode only logs what would be delayed, so you can test safely on a live store. Core scripts are never delayed: RequireJS, jQuery, Knockout, Magento UI, Alpine.js and Magewire on Hyvä, as well as payment and reCAPTCHA scripts. See how to delay Google Tag Manager in the user manual.

Defer JavaScript and CSS to the page bottom
Reduce render blocking

Defer JavaScript and CSS to the page bottom

Render-blocking resources are one of the most common PageSpeed Insights findings. By default, Magento loads JavaScript in the page head, so the browser downloads and runs it before it shows the content. CSS files in the head have the same effect.

The extension moves JS and CSS to the bottom of the page, so the main content renders first. Magento's own option covers JavaScript only; here CSS moves too, and you keep control with exceptions: a list of scripts to leave in place and a rule that keeps specific CSS in the head.

Read more about fixing render-blocking resources in Magento 2.

Render the first screen first

Critical CSS per page type

Critical CSS is the small part of your styles needed to draw the first screen. When it is inlined and the rest of the CSS loads later, the page appears sooner and Largest Contentful Paint improves.

The extension keeps critical CSS as rules. Each rule matches pages by full action name, layout handle or URL pattern, so product, category, CMS and checkout pages, as well as pages of third-party modules, get their own CSS for each store view. When a rule matches, the remaining CSS loads without blocking the first render.

You can paste critical CSS into a rule yourself or let the built-in extractor take it from the real page, on demand or on a schedule. The extractor needs Node.js and Chrome on the server, while the storefront itself stays pure PHP. Setup is described in the user manual.

Reduce the JS, CSS, HTML size

JS, CSS and HTML minification

Minification removes comments, whitespace and formatting from JS, CSS and HTML files, so the browser downloads less data.

The extension turns on Magento's minification for JS, CSS and HTML from one settings page, each type separately. Scripts that break when minified go on an exception list. Merge CSS files is available in the same place.

Speed up page loading

Preload fonts and connect early

Some resources the first screen needs, such as web fonts, are referenced deep inside CSS files, so the browser discovers them late.

The extension lets you preload fonts, open early connections (preconnect) to the third-party domains your pages use, and preload the home page hero image, optionally for a specific screen width only. The browser starts these downloads right away instead of finding them later.

Postpone videos and fonts

Defer YouTube videos and Google Fonts

YouTube embeds and Google Fonts come from third-party servers, slow down the first load and are often flagged by PageSpeed Insights.

The extension replaces each YouTube video with its thumbnail and a play button, and the video loads only when the visitor clicks it. Other iframes, such as maps, can be lazy-loaded too. Google Fonts load without blocking rendering and use font-display: swap, so text stays visible while the font downloads.

Image Optimization: Compression, WebP and Lazy Loading

Images are usually the heaviest part of a page. The extension compresses them, serves them as WebP, loads offscreen images only when needed and makes sure the most important image loads first.

Lazy loading of images
Load images when they are viewed

Lazy loading that keeps the main image first

Magento 2.4 lazy-loads product images in category listings only. Banners, CMS and Page Builder images, and background images load right away and compete with the content the visitor sees first.

The extension adds the browser's native lazy loading to images across the store, and to background images set by Page Builder or by the CSS classes you list. Offscreen images load when the visitor scrolls close to them.

The first images on the page skip lazy loading and can get fetchpriority="high", so the Largest Contentful Paint image is never delayed. On product pages, the main gallery photo is preloaded automatically. You can exclude any image by file name or type, and SVG files are skipped by default. More details are on the Lazy Load page.

Image compression
Reduce image size

Image compression

The extension compresses JPEG, PNG and GIF images with standard server tools (jpegoptim, optipng and gifsicle) and checks for you that they are installed. Choose the quality level: 100% (lossless, the default), 90%, 80% or 70%.

Optimization runs in the background by cron or from the command line. You choose whether it scans the media folder or the images your pages actually serve, including theme and static files. You can exclude a format, for example GIF, and restore the original images at any time, all of them or one format only.

WebP format support
Use modern image format

WebP conversion

According to Google, lossy WebP images are 25–34% smaller than comparable JPEG files, and lossless WebP images are 26% smaller than PNG.

Once you turn WebP on, the extension creates a WebP copy of each image and serves it in a picture tag, with the original as a fallback for browsers without WebP support. Background images, the product gallery and swatches get WebP too, which helps with the "Improve image delivery" finding in PageSpeed Insights.

Fit images to the screen

Responsive images

For the images you choose by file name pattern, the extension generates a set of smaller copies, so a phone gets an image sized for its screen instead of the desktop one. You can generate and clean up these sets from the admin or the command line.

Built-in PageSpeed Insights Monitoring

List the URLs you want to watch, and the extension runs PageSpeed Insights tests for them by cron, for desktop and mobile. Each page gets its own score history chart, so you can see how every change affects the score without checking pages by hand.

The tests run with your own free Google API key. You can also test any page from the command line.

PageSpeed Insights monitoring in the Magento admin

Run Optimization from the Command Line

Frequent tasks can be run from the command line (CLI) instead of waiting for cron:

  • Run a PageSpeed Insights test for a page of your store
  • Optimize all images or a specific file or folder
  • Create WebP copies of images
  • Validate the image tools installed on the server
  • Restore original images, all of them or one format only
  • Clean up records of deleted images
  • Extract critical CSS

See the full list of CLI commands in the user manual.

Full Features List of Google PageSpeed Optimizer

JavaScript Optimization:

  • Pre-flight check
  • JS bundling by page type
  • Exclude pages from bundling
  • Delay JavaScript until user interaction
  • Dry Run mode for delayed scripts
  • Merge JavaScript files
  • Minify JavaScript
  • Move JavaScript to page bottom
  • Ignore URL list
  • Defer YouTube videos
  • Lazy-load iframes

CSS Optimization:

  • Critical CSS rules per page type
  • Built-in critical CSS extractor
  • Defer non-critical CSS
  • Merge CSS files
  • Minify CSS files
  • Move CSS to page bottom
  • Add styles to HTML from CSS resources
  • Defer Google Fonts
  • Additional CSS styles

Image Optimization:

  • JPEG, PNG and GIF compression
  • Image quality level
  • Image scan strategy
  • WebP conversion with fallback
  • WebP in product gallery and swatches
  • Exclude image formats
  • Optimization stats: scanned files, WebP files, saved size

Image Lazy Load:

  • Native browser lazy loading
  • Lazy-load background images
  • Preload first N images
  • Preload first N background images
  • fetchpriority="high" for preloaded images
  • Do not use lazy load for images

HTML Optimization:

  • Minify HTML
  • Preload fonts
  • Preconnect to third-party domains
  • Preload home page hero image
  • Preload product main image

Command Line Interface:

  • Run a PageSpeed Insights test for a page
  • Validate the image tools on the server
  • Run image optimization
  • Create WebP copies of images
  • Restore original images
  • Extract critical CSS

Responsive images:

  • Generate a set of responsive images
  • Clean up the created responsive images
  • Configure the file naming patterns

Google PageSpeed Insights:

  • Google PageSpeed Desktop Score
  • Google PageSpeed Mobile Score
  • Score history per URL
  • Run Google PageSpeed Test
  • Specify URLs for monitoring in PageSpeed
No hidden fees
Our developers install the extension on your store and configure it for your setup, free of charge.
Lifetime access to source code
Access to free support and updates for 1 year
Updates and support prolongation - $90

Pay today $149 for the first year.

Then $90 for updates and support services per year.

Cancel anytime.

30 days money back guarantee
See it in action!
Pick a quick tutorial to learn about various aspects of this extension
Customer Reviews 48
Earn points for your review about this extension modules. $1 = 10 points
Write Your Own Review

check-circle You submitted your review for moderation.

Tbb Verified Buyer
From Barcelona, Spain
Using the module for 8 months
We use it to optimise images and JavaScript: clear improvement without complicating the workflow
On one of our Magento 2 projects, we use Google PageSpeed Optimizer to handle catalogue image optimisation and frontend JavaScript bundling.

The most visible improvement is on images. The module processes formats such as JPEG, PNG and GIF, and tracks which files have already been optimised, avoiding unnecessary reprocessing. In our case, it has processed more than 19,000 images, with an aggregate weight reduction of over 50%. PNGs benefit the most, while JPEGs keep a more balanced compression.

On the JavaScript side, bundling helps reduce the initial load by grouping frontend resources. It is not as visible as image optimisation, but it does show up in load and performance metrics.

The whole process runs in the background and, once configured, requires no day-to-day intervention. The module manages file state and applies optimisations progressively when new files appear.

The key is defining the compression level well from the start. From there, the system stays stable without needing external processes or manual adjustments.

Overall, it is a practical solution for reducing asset weight in Magento without adding complexity to the workflow.
Also installed:
Advanced Reports,  Reward Points,  Affiliate,  Automatic Related Products,  Full Page Cache Warmer,  Google Shopping Feed,  Extended Shopping Cart Rules and 9 more
Mikas Verified Buyer
From Ottawa, Canada
Using the module for over 1 year
Very good for everyone
Very good module, easy to use and well put together!
Also installed:
Advanced Product Feeds,  Automatic Related Products
Javier Verified Buyer
From Málaga, Spain
Using the module for over 2 years
Imprescindible
He probado otros módulos WPO pero este es el más completo. Para mí, un indispensable para hacer que las Magento consigan una velocidad aceptable
Also installed:
Elastic Search Ultimate,  Improved Sorting,  Advanced SEO Suite,  Full Page Cache Warmer,  Google Tag Manager,  Advanced Reviews,  Layered Navigation and 9 more
dante Verified Buyer
From United States
Using the module for over 1 year
Great
I recently started using the Google Page Speed Optimizer for Magento 2 and I have been blown away by the results. My website's loading speed has significantly improved, which has not only enhanced the user experience but also boosted my search engine rankings. The extension is incredibly easy to install and configure, and the support team is always available to assist with any issues. Overall, I highly recommend this extension to anyone looking to improve their website's performance and increase their online visibility.
Also installed:
AI Assistant,  Automatic Related Products
JGC Verified Buyer
From Vernon, Canada
Using the module for over 3 years
Full Speed Ahead
This made a huge difference in the loading speed of our website. I had a few issues with implementation at the beginning but the support was quick and excellent.
Also installed:
Elastic Search Ultimate,  Layered Navigation,  Advanced Reports,  Product Finder,  Product Labels,  Blog MX,  IP Geolocation Redirect and 7 more
Manual & Support
Need more help?

Save time by starting your support request online and we'll connect you to an expert.

Frequently asked questions
chevron-down chevron-right

How can I speed up Magento 2 without coding?

Install the extension and turn its options on one by one in Stores > Configuration > PageSpeed Optimizer. A safe order is image compression, WebP and lazy loading first, then JavaScript and CSS optimization, then critical CSS and delayed third-party scripts.

Add your key pages to the built-in PageSpeed Insights monitoring to see how each step changes the score. Step-by-step instructions are in the user manual.

chevron-down chevron-right

Does it work with Hyvä themes?

Yes. Image compression, WebP, lazy loading, preload, delayed third-party scripts and PageSpeed monitoring all work on Hyvä. Delay JavaScript never holds Alpine.js, Magewire or other Hyvä scripts.

JavaScript bundling and merging are built for RequireJS themes such as Luma. Hyvä doesn't use RequireJS, so you don't need these options there.

chevron-down chevron-right

Will bundling or delaying JavaScript break checkout?

Checkout is excluded from JavaScript bundling by default. Delay JavaScript never holds Magento core scripts, payment scripts (PayPal, Stripe, Klarna) or reCAPTCHA, and Defer Google Fonts is skipped on checkout.

Before delaying scripts on a live store, run Dry Run mode: it only logs which scripts would be delayed.

chevron-down chevron-right

Do I need Node.js to use critical CSS?

No. You can paste critical CSS into a rule yourself. Node.js and Chrome are needed only for the built-in extractor, which takes the CSS from the real page on demand or on a schedule. If your server can't run them (for example, Adobe Commerce Cloud web nodes), extract the CSS elsewhere and paste it into the rule.

chevron-down chevron-right

How does JavaScript and CSS optimization work?

The extension bundles only the JavaScript each page type uses, minifies and merges JS and CSS, moves render-blocking files to the bottom of the page, and loads non-critical CSS after the critical CSS of the page. Third-party scripts such as Google Tag Manager can wait until the visitor's first interaction. Fewer and smaller requests mean the first screen renders sooner.

chevron-down chevron-right

Why convert images to WebP?

WebP gives similar quality at a smaller file size: Google reports lossy WebP images 25–34% smaller than JPEG and lossless ones 26% smaller than PNG. Once you turn WebP on, the extension converts images automatically and keeps the original as a fallback for browsers without WebP support.

chevron-down chevron-right

How does lazy loading improve Magento performance?

Lazy loading makes offscreen images load only when the visitor scrolls close to them, so the first screen downloads less. The extension uses the browser's native lazy loading, covers background images, and keeps the first images (including the main product photo) out of lazy loading so Largest Contentful Paint isn't delayed. See the Lazy Load page for details.

chevron-down chevron-right

Can I skip optimization for PNG or GIF images?

Yes. Exclude any format (JPEG, PNG or GIF) from optimization and WebP conversion in the settings. If a format was already optimized, you can restore the originals of that format only from the command line.

chevron-down chevron-right

Does it convert images to AVIF?

No, the extension converts images to WebP, which all current major browsers support, and keeps the original JPEG, PNG or GIF as a fallback.

Changelog
Version 2.3.4Oct 12, 2026
The module is now ready for Mirasvit Core 2.0. It uses Magento's own JSON handling for its settings, product gallery and swatch images, Page Builder background images, JS bundle tracking and the PageSpeed score charts in the admin. It no longer relies on a Core helper that Core 2.0 removes, so upgrading Core will not break the storefront or the admin.
⚠️ On upgrade, a one-time step converts the Responsive images and Preload fonts settings from the old pre-Magento 2.2 storage format to JSON, in every scope (mst_optimize/optimize_image/responsive/image and mst_optimize/optimize_html/preload_fonts in core_config_data). Without this step, stores that last saved these settings on Magento 2.1 or earlier would see them come back empty. Settings already stored as JSON are not changed, and a value that cannot be read is left as is and logged as a warning.
Version 2.3.3Oct 9, 2026
Image optimization on remote media storage — images are now optimized and converted to WebP on stores that keep media on remote storage, such as Amazon S3. Before, the module did nothing on these stores and logged no error. It looked up each image under a full bucket URL that matched no record. The media-folder scan found no files, and the optimizer tools never got a file to work on, so every page kept serving the original images. Now, on remote storage, images are picked up when storefront pages request them, because scanning a whole bucket would be slow and costly. Each image is downloaded as a working copy for the optimizer tools, and the result is uploaded back. Stores with local media work as before, and their existing image records stay valid without any migration.
On stores with remote media, storefront pages no longer run a database lookup for every image looking for a record that could never match. This removed 21 of 195 queries on one tested home page. Pages also send fewer requests to the bucket: the module remembers which optimized copies exist and stops re-downloading SVG and ICO files to check their type.
Image records are now keyed by where the media folder actually is, as set in Magento's directory configuration. Stores that moved pub/media elsewhere (split deployments, hosted platforms) now get correct matches. A store root such as /var/www is also no longer mixed up with a media folder at /var/wwwdata/media.
⚠️ Stores that use the Webpages scan strategy with remote media may still have image records saved under the old URL-shaped keys. These records no longer match anything and are not cleaned up automatically. They are harmless; you can safely truncate the mst_optimize_image_file table to remove them.
Fixed the checkout breaking when Move JavaScript To Page Bottom was turned on: customers could not place an order. /checkout is now the default value of the move-JS URL exception list, matching the JS bundling exception list. Stores that saved the JavaScript settings before this default existed have an empty saved value that overrides it. On upgrade, each empty JS bundling or move-JS exception value, in any scope, is set to /checkout. Lists you filled in yourself are not changed.
Fixed Delay JavaScript skipping every inline script on a page that contained one large inline script (about 9 KB or more; Algolia and cookie-consent settings easily reach that size). Nothing was logged when this happened.
Fixed the store-view setting for Move JavaScript To Page Bottom being ignored; only the default-scope value was applied.
Fixed disabling this module also disabling Magento's own Minify JavaScript Files setting (Advanced → Developer).
Fixed JS bundles no longer loading on the storefront after Minify JavaScript Files was turned off without redeploying static content.
Fixed JavaScript used on only some pages being added to the default bundle that every visitor downloads. Repeat visits to the same page made the file look as if every page used it.
Fixed the JS bundle tracking endpoint returning a server error on malformed data and discarding the valid URLs in the same request.
Fixed the Ignore List not applying to YouTube iframes when Defer YouTube videos was enabled.
Fixed lazy-loaded iframes never loading when the page output was processed twice; each pass also added another <noscript> copy.
Fixed a page that contained the same inline script twice losing one copy, even when that copy was inside an excluded block.
Fixed the critical CSS extractor picking up styles from iframes on the page, such as third-party chat widgets. Once inlined into the page, one widget's styles froze the storefront: scrolling and clicks stopped working, and the content was squeezed into a single screen.
Fixed raw error text being shown in the admin when critical CSS extraction failed unexpectedly. The admin now shows a short message, and the details are written to the exception log.
Fixed the admin reporting "The rule has been deleted." when deleting a critical CSS rule that no longer existed, for example from an outdated grid in another tab or after pressing Back.
Fixed GIF optimization working only when started from the Magento root folder; it failed for cron jobs and services that run from a different working folder.
Fixed images under pub/ but outside pub/media, such as versioned static images, being treated as missing even though they were on disk.
Fixed bin/magento mirasvit:optimize-image:optimize with a path argument reporting "No files to process" under the Webpages scan strategy. Its progress bar also started from too low a count.
Fixed image records on remote media being deleted whenever an image appeared to be missing, which undid their optimization until the next scan. On these stores, records for pub/static and other local files are still cleaned up.
Fixed several remote-storage issues: optimized copies and WebP versions were checked on the local disk while the page URL pointed to the bucket. Pending images also showed "Not allowed file extension" in the debug output, and the cron looked for optimized copies in the wrong place.
Fixed failed PageSpeed checks being saved as a score of 0, which made the score graph drift toward zero and the store look slower. A check fails when there is no outbound access, the API key is invalid or expired, the quota is used up, or the request times out. Failed checks are now skipped and the reason is logged, and bin/magento mirasvit:optimize-insight:pagespeed exits with an error code.
Fixed saved PageSpeed score records having no ID, so they could not be loaded or deleted.
Version 2.3.2Sep 22, 2026
Exclude image formats from optimization — a new Exclude image formats from optimization field under Stores → Configuration → PageSpeed Optimizer → Image optimization lets you leave JPEG, PNG or GIF images alone. An excluded format is neither compressed nor converted to WebP, and never enters the optimization queue at all. Nothing is excluded by default, so existing stores are unaffected, and each format can be excluded on its own. The JPEG option covers both .jpg and .jpeg files. Clearing a format puts it back into the queue on the next run.
Restore one image format — bin/magento mirasvit:optimize-image:reset accepts a new --format option (for example --format=gif, repeatable) that restores the originals for just that format and leaves the optimized and WebP copies of the other formats in place. This is the documented way back after excluding a format, since copies made before the exclusion are kept. An unknown format name is refused with the list of valid ones instead of matching nothing.
Responsive image generation and cleanup now read the image table once per run instead of once per configured responsive image, and each of those reads scanned the whole table. On stores with a large image table (one customer's had grown to 13.3 million rows) and several configured responsive images this was the slowest part of the job. The files produced are identical; cleanup now also deletes a file covered by two configurations once instead of once per configuration.
Storefront pages look up all their images in two database queries instead of two per image. On a Hyvä home page, 30 of the page's 103 queries were these lookups — and all 30 were misses, because that store serves its images from a CDN. The markup produced is unchanged.
⚠️ Matching a configured responsive image against stored image paths is now a plain case-insensitive substring test. It now also matches when the configured name differs in letter case from the stored path (those images were resized before and would otherwise have stopped being). It no longer treats _ and % in a configured name as wildcards — previously hero_banner.jpg also matched heroXbanner.jpg. This aligns generation with the check that decides which image is actually served.
Fixed bin/magento mirasvit:optimize-image:reset stopping with a fatal error part-way through when it hit an image file that exists but cannot be read. The run aborted, leaving every record it had already processed stripped of its optimized and WebP copies on disk while the rest of the table still pointed at files the run had deleted. Such a record is now removed like a missing one, and the next scan re-creates it if the file becomes readable again.
Version 2.3.1Sep 15, 2026
The admin warning about WebP conversion now names the image formats that cannot be converted on your server (for example, only GIF when the gif2webp tool is missing but cwebp works) instead of reporting that WebP conversion does not work at all — and it is no longer shown on stores that keep WebP turned off. bin/magento mirasvit:optimize-image:validate now also checks for gif2webp.
Fixed the image optimization cron running for hours and re-processing the same images over and over on servers where the required tools are missing or only partly installed. While it did, it held the default cron group, so other jobs — including the order, invoice, shipment and credit memo e-mails — piled up hundreds of missed runs. The queue now only picks up images the installed tools can actually produce a result for, stops as soon as it notices the same batch coming back, and ends a run after five minutes (bulk work belongs to bin/magento mirasvit:optimize-image:optimize, which now has the same safeguards and tells you when nothing can be processed).
Fixed images being silently skipped forever when the server reports their file type with a different spelling than expected (for example image/x-png for a PNG, image/pjpeg for a JPEG, or a type with a charset suffix) — there was no error and no log entry, the images simply never appeared in the optimization queue. These spellings are now recognised, so the affected images get optimized.
Turning image optimization off no longer switches off the cleanup of the image-optimization table: the file scan and the orphaned-record sweep now run before the on/off check. This matters because switching optimization off is the natural reaction to discovering an oversized table — which is exactly when the pruning has to keep running.
Fixed the JavaScript bundling feature's tracking requests starting a Magento session on every storefront page. With locking session storage (Redis) they waited on the session lock the page request itself was holding, adding 400 ms to 1.3 s to page response times — one store measured page-finish times of up to 1.6 minutes. Neither request reads or writes the session, so no session is started for them now.
Fixed the JavaScript bundle tracking endpoint recording nothing when it received a single URL instead of a list — it answered with "success" while quietly storing nothing, leaving only a warning in exception.log. A single URL is now handled like a list.
Fixed misspelled admin labels: "Add styles to HTML from CSS resourses" and its help text now read "resources", and the image lazy-load hint now reads "Only affects background images added from the page builder". Existing translations for all locales are unchanged.
Version 2.3.0Sep 3, 2026
Developer Mode switch — a new Developer Mode setting under Stores → Configuration → PageSpeed Optimizer → General controls the ?debug=lazy and ?debug=optimize-image debug output on the storefront. It ships turned off, so this diagnostic information is no longer visible to anyone who guesses the URL parameter on a live store; turn it on only while troubleshooting.
Clean up orphaned image records — the new bin/magento mirasvit:optimize-image:cleanup command removes image-optimization records for files that no longer exist on disk, and deletes the optimized/WebP copies left behind with them. Useful after purging the product image cache or deleting products. The command refuses to run (and removes nothing) when media is stored remotely or in the database, where missing files cannot be detected reliably.
The image optimization cron now sweeps out orphaned records on every run, so the optimization table no longer grows without limit after image cache purges — on one store it had reached 13 million rows (11.7 GB) for about 14,000 real images. The sweep works in batches, so it stays fast and light even on tables that large, and is skipped automatically on remote (S3) or database media storage.
Storefront pages issue far fewer database queries for image optimization: repeated lookups of the same image within a page are now reused instead of re-queried (a category listing dropped from ~150 queries down to one per distinct image).
⚠️ New default: the "Do not use JavaScript bundles on pages" list now defaults to /checkout, so JavaScript bundling no longer breaks the checkout on a fresh install. Stores that never saved a value for this field will pick up the new default (config path mst_optimize/optimize_js/bundle_js_exception) — set the field explicitly if you want bundles on checkout.
The help text for the "Do not use JavaScript bundles on pages" field now explains exactly what it accepts: a pattern is part of the URL path, matching is case-sensitive, a full action name (e.g. checkout_index_index) limits it to a single page, full URLs and wildcards are not supported, and a lone / disables bundles across the whole store.
Fixed setup:static-content:deploy failing with an "Undefined constant … BUNDLE_JS_DIR" fatal error on Mage-OS installations — the module now detects Magento's deploy component properly instead of looking for it at a fixed vendor path.
Fixed the ?optimize_js= URL parameter being written into the page markup as given, which allowed a crafted link to inject content into the storefront HTML. Only the two valid modes are now accepted; anything else falls back to the default.
Fixed a single 0 in the iframe lazy-load exception list being silently dropped instead of used as a pattern.
Fixed several admin configuration labels and help texts that still displayed in English on non-English admin panels — including the image optimization strategy options, the PageSpeed insight score labels and the "Preload recourses" help. All admin wording, including the new settings above, is translated across the 15 supported locales.
Reasons to choose Mirasvit
Client focusing and satisfaction

These are our primary. A major portion of our new clients come from referrals from our existing clients. Our professional team of developers, marketers and support staff have invested the best knowledge and experience in the field into our work, so you know you can come back to us again and again.

Remarkable support

One year free and high quality support. We go to great lengths to provide maximum satisfaction with every module you have purchased in our store. By helping you with installation, configuration, answering your every question, we do all our best to eliminate any possible problems.

Risk-free Investment

30-days money back guarantee. If you are not satisfied with our extension performance for any reason, we provide a full refund.

Constant improvements and upgrades

We constantly add new features to all our modules, and are always interested in hearing your opinion and implementing your suggested features in our future developments.

Comprehensive Documentation

We provide an expanded user guide for every aspect of our extension, so you can find answers for all your burning questions.

Unencrypted source code of our products

You can customize extension according to your needs and requirements.

Usability and Performance

The Module is easy to install and upgrade, just follow our step-by-step user guide. Additionally, the extension is ready to use with the Hyvä theme.

Ready for Magento Cloud

No core modifications. The extension has been tested in a Magento Cloud environment and is fully compatible with it.

Loading...