Skip to content
Grav 2.0 is officially stable. Read the announcement →
Premium / Image Optimize
Premium Plugin · v3.1.0

Image Optimize

Simplify your workflow and skip manual image optimization for all your images in your Grav site. Image Optimize provides a simple interface to see the current size of all your images, and easily compress your images using a variety of Image Compression services. Compare the original to the compressed version, and even roll-back the compression if you are not pleased with the results.

Grav 1.7+

Everything you need. Nothing you don’t.

Over 11 distinct features and integrations, out of the box.

01
Optimize all the image in your Grav site via a single user interface
02
Choose from 3 powerful Image Optimziation APIs: reSmush.it, Tinify, and Kraken.io
03
Optimize any image you chose, or use Bulk Optimization to optimize non-optimized or all images
04
Visually inspect the optimized image compared to the original with an easy-to-use slider-based comparison UI
05
The ability to revert any optimization with a single click
06
Tinify provides the best optimization and is competitively priced and supports JPG, PNG as well as modern WEBP images
07
reSmush.it is 100% free to use with no registration and supports JPG, PNG, and GIF (including animated) formats
08
Kraken.io is reasonably priced and supports JPG, PNG, and GIF (including animated) formats
09
Supports keeping or stripping out EXIF data for improved compression and optimization
10
Customize the level of compression you want to use for the image optimization process
11
Exclude arbitrary directories from the image optimization process
Bulk Optimization

Bulk Optimization

Image Optimize is an all-in-one plugin that makes it dead simple to easily optimize any image on your site. As it optimized in-place, there is no fussing around with uploading to 3rd party web services, optimizing, and then downloading, then replacing the image on your site. It is as easy as choosing the images you want to optimize, and then clicking a single button!

Convenient Image Comparison

Image optimize includes a super convenient image comparison feature to compare the original against the optimized image to ensure the optimization doesn't cause any unexpected issues. If the optimized image is not to your liking, you can simply click the revert button to quickly undo any optimizations and restore the original image.

Convenient Image Comparison
Simple Optimization

Simple Optimization

Quickly perform optimization of any image in your grav site by clicking the compress button, and instantly see the optimized size and percent savings. There are also Bulk Optimization options to optimize selected, all, or un-optimized images.

$50 Buy Now

Image Optimize Changelog

v3.1.0

1 week ago

    • Added a Rasterfox compression preset selector, available both in the plugin settings and directly on the Image Optimize listing page. Defaults to the existing quality setting, so nothing changes until you pick a preset.
    • The preset list is read from the installed Rasterfox binary rather than hardcoded, so only presets your CLI version actually accepts are offered. A preset that is no longer recognised falls back to the quality setting instead of failing the optimization.
    • The quality control is hidden while a preset is active, since the CLI rejects --preset and --quality together.
    • The Rasterfox preset and binary path settings now sit inside the Rasterfox block on the plugin settings page, so they only appear when Rasterfox is the selected service, matching how the Tinify and Kraken keys behave.
    • Added a sortable Modified column to the image listing in both admin interfaces, so the most recently uploaded images can be brought to the top.
    • Every data column in the Admin Next listing is now a sort control — Path, Modified, Original, Optimized and Savings — clicking a column sorts by it and clicking again reverses. This replaces the separate sort and direction dropdowns in the filter bar. Optimized and Savings are backed by a cached metrics pass that rebuilds itself whenever the images change.
    • The Actions column is now right-aligned rather than centered.
    • The listing now defaults to Modified, newest first, and remembers the column and direction between visits — sharing the same stored preference the classic admin already used, so the two stay in step.
    • Refresh now shows it is working: the toolbar icon spins and the stats line reports the rebuild, with a short minimum so a fast local rebuild registers rather than flickering.
    • The filter box has a clear button once something is typed.
    • Refresh Index had no effect in Admin Next. The image index was being written to user/data/image-optimizeindex.json — beside its folder rather than inside it — because findResource() returns no trailing separator. Refresh deleted the correct-looking path, which had never existed, so it reported success while the stale index was still served. Newly uploaded images stayed invisible until the cache TTL lapsed. The stray file is removed automatically on upgrade.
    • Filtering the listing in Admin Next sent q=undefined and returned nothing. The debounced handler read e.target.value after the render that replaced the input, and an event target is only valid while the event is dispatching. The same pattern in the quality field is fixed too.
    • A filter that matched nothing replaced the whole toolbar with the "no images found" state, leaving no way to clear the search.
    • Typing in the filter box lost focus after the first keystroke, because each search re-rendered the toolbar. Focus and caret position now survive a re-render.
    • Listing column headers in Admin Next were left-aligned over right-aligned data, so Original, Optimized, Savings and Actions never lined up with their titles. .data-table th set text-align with element+class specificity, which outranked the bare .th-right / .th-center helpers.
    • Rasterfox no longer receives GIFs, which it cannot process. Previously a GIF was reported as "already optimized" rather than unsupported.
    • Rasterfox now optimizes WebP images, which were silently skipped because the service inherited the default JPEG/PNG/GIF filetype list.
    • The cached image index is now keyed by service, so switching services rebuilds the list instead of serving one scanned with the previous service's formats.
    • Rasterfox binary lookup now prefers /opt/homebrew/bin over /usr/local/bin, matching the order its own fallback list already used. A stale copy in /usr/local/bin could otherwise shadow a newer Homebrew build, so the web request and the shell resolved different versions.
    • Blueprint adjustments now also reach Admin Next, which resolves plugin blueprints over the API and never fires onBlueprintCreated. They previously applied only in admin-classic.
    • Blueprint adjustments are no longer applied to any other plugin's form that happens to define a service field.
    • Corrected the Rasterfox description, which credited mozjpeg instead of the oxipng/QuantCrush and jpegli encoders it actually uses, and omitted WebP support.
    • Aligned the default image quality in blueprints.yaml with the 85 already set in image-optimize.yaml.
    • Added the missing rasterfox.binary entry and rasterfox service option to image-optimize.yaml.

v3.0.3

3 months ago

    • Fixed PHP 8.4 deprecation warnings from implicitly nullable function parameters.

v3.0.2

3 months ago

    • Fixed a php function being used in Twig, now replaced by twig function/filter

v3.0.1

3 months ago

    • The Image Optimize sidebar entry is now hidden from users who don't have the Image Optimize permission. Requires grav-plugin-api ≥ 1.0.0-rc.11.

v3.0.0

5 months ago

    • Added Grav 2.0, API, and Admin 2.0 support

v2.3.1

10 months ago

    • base_url fixes
    • pagination fixes

v2.3.0

11 months ago

    • Improved error handling to show error in tooltip over thumnail
    • In Rasterfox CLI provider, don't replace image if optimized version is larger
    • Persist sort order in local storage
    • Allow live-changing of quality chooser without reloading the page
    • Set default quality to 85%

v2.2.1

11 months ago

    • HTMX-powered pagination to improve performance

v2.2.0

11 months ago

    • Improved error responses in the XHR request handling

v2.1.2

12 months ago

    • Added pagination for improved performance with many images
    • Converted JS from JQuery based to vanilla JS
    • Fixed listing states when paginating