PX Image Optimizer compresses and resizes images when you upload them, creates WebP copies and serves them with picture tags, optimizes existing folders in bulk and keeps every original for restore. Set it up in Components → PX Image Optimizer.

PX Image Optimizer makes the images of your Joomla site smaller without changing how you work. Images you upload in the Media Manager are resized, cleaned and recompressed on the way in, a WebP copy is saved next to each one, and your pages serve the WebP copy to browsers that support it. Existing images can be optimized in bulk, and every original is kept so you can restore it. PX Image Optimizer is free.

  • Optimize on upload: resize oversized images, strip EXIF/GPS data, fix the orientation and recompress JPEG and PNG.
  • WebP: a .webp copy next to each JPEG and PNG (photo.jpg → photo.webp).
  • Served automatically: local <img> tags get a <picture> wrapper with the WebP source; older browsers keep the original.
  • Bulk optimize the images that are already on your site, folder by folder.
  • Restore any image to its original with one click.
  • Savings dashboard and a system check for Imagick, GD and WebP support.

System requirement

  • Joomla 6.x
  • PHP 8.3 or later with Imagick (preferred) or GD with WebP support
  • A MySQL or MariaDB database
  • Images on the local Media Manager adapter (files in images/ and other local folders). Remote adapters such as S3 are skipped.

Install the package

  1. Download pkg_pxio-1.0.0.zip from the PX Image Optimizer page (a free thepixel.dev account is enough).
  2. In the Joomla administrator, go to System → Install → Extensions and upload the zip.
  3. Open Components → PX Image Optimizer → System check and make sure the engine and WebP show Yes.

The package installs the component and the plugin System - PX Image Optimizer and enables the plugin. From then on, new uploads are optimized with the default settings below.


Components → PX Image Optimizer → Settings:

PX Image Optimizer settings
The defaults suit most sites.
SettingWhat it does
Enable PX Image OptimizerMaster switch for upload processing and the front-end rewrite.
1Optimize on uploadProcess JPEG, PNG and WebP files uploaded in the Media Manager.
2Create WebP siblingWrite a .webp file next to the original.
3Front-end <picture> rewriteServe the WebP copy on your pages (see WebP on your pages).
Keep originalsSave the original file before it is changed, so you can restore it.
Quality presetBalanced (smaller files, no visible change) or Lossless. PNG files stay lossless in both.
4Max width / Max heightLarger images are scaled down to fit (default 2560 px; 0 = no limit).
Strip EXIF / GPSRemove camera and location data and fix the orientation.

When an optimized file would be larger than the original, the original is kept. GIF and SVG files are not touched.


Components → PX Image Optimizer → Bulk optimize processes the images that were on your site before you installed PX Image Optimizer.

  1. 1Folder: a folder under images, files or media, for example images or images/blog. Subfolders are included.
  2. Batch size: how many files one request handles (up to 50). Lower it if your host has a short time limit.
  3. 2Click Run batch. The page runs the next batch by itself until the folder is done, and shows how many images were optimized, skipped or failed.
PX Image Optimizer bulk optimize form
Images that are already optimized are skipped, so you can run it again at any time.

Components → PX Image Optimizer → Images lists every optimized image with its size before and after and the space saved. Search by path or filter by status. 1 Restore puts the original file back, deletes its WebP copy and removes the image from the list.

PX Image Optimizer images list with Restore buttons
Restore is available for every image whose original was kept.

The dashboard shows the totals: images processed, megabytes saved and failures.

PX Image Optimizer dashboard with savings totals and server capabilities
Components → PX Image Optimizer → Dashboard.

With Front-end <picture> rewrite on, every local image on a page that has a WebP copy is served like this:

<picture>
  <source type="image/webp" srcset="/images/blog/photo.webp">
  <img src="/images/blog/photo.jpg" alt="…">
</picture>

Browsers with WebP support load the smaller file; the others load the original. Your articles and modules are not changed: the rewrite happens when the page is sent. It leaves alone images from other sites, images that already have a srcset or sit inside a <picture>, and anything inside scripts. Add data-pxio="1" to an <img> to skip it.


Components → PX Image Optimizer → System check shows which image engine is used (Imagick, or GD when Imagick is missing), whether WebP can be written, whether EXIF data can be read and where the originals are kept (media/com_pxio/backups). AVIF and command-line tools are not used by the free edition.

PX Image Optimizer system check
Engine and WebP must show Yes.

  • Very large images are skipped: with GD, a photo needs about 5 bytes of PHP memory per pixel. PX Image Optimizer raises the memory limit when it can and otherwise skips the file (status failed, "too_large_for_memory"). Ask your host for Imagick or a higher memory_limit.
  • No WebP on the page: check that the front-end rewrite is on, that the page cache was cleared, and that the .webp file exists next to the image.
  • Uninstalling removes media/com_pxio including the kept originals, so restore the images you want back first. WebP copies next to your images stay on disk.