---
title: "Get Image Optimization Settings Ability: Read Compression Config in WordPress"
url: https://nexterwp.com/docs/nexter-ability-get-image-optimization/
date: 2026-05-29
modified: 2026-08-19
author: "sandip patel"
description: "The nexter/get-image-optimization ability returns Nexter Extension image optimization settings including format, quality, resize rules, and exclusion paths."
word_count: 258
---

# Get Image Optimization Settings Ability: Read Compression Config in WordPress

## Key Takeaways

- nexter/get-image-optimization returns the full current image optimization configuration in Nexter Extension, including image_format, quality_mode, max_width, max_height, exif_data, and exclude_paths.
- nexter/get-image-optimization is read-only and accepts no parameters, so it does not change any image optimization settings.
- Image Optimization extension must be enabled in Nexter Extension settings, or nexter/get-image-optimization returns an empty or default configuration.

The **nexter/get-image-optimization** ability returns the current image optimization configuration in Nexter Extension. It reads format settings, quality mode, maximum dimensions, EXIF handling, exclusion paths, and all other compression options. This is a read-only ability. Call it before **nexter/update-image-optimization** to review current values.

## Key Takeaways

This is a read-only ability. It does not change any image optimization settings.

This ability accepts no parameters. It always returns the full current configuration.

It returns the output format, quality mode, max dimensions, EXIF handling, exclusion paths, and more.

Call this first before **nexter/bulk-optimize-images** to confirm your format and quality settings are correct.

## Required Setup

The Image Optimization extension must be enabled in Nexter Extension settings. If it is disabled, the ability returns an empty or default configuration. Use **nexter/update-image-optimization** with **enabled: true** to activate it.

## What It Returns

The ability returns the full image optimization configuration object with all current settings.

**image_format**: the output format. Options: webp, avif, original, smart.

**quality_mode**: the compression quality preset. Options: balanced, lossless, aggressive.

**max_width** and **max_height**: the maximum pixel dimensions for resized images.

**exif_data**: whether EXIF metadata is stripped or kept during optimization.

**exclude_paths**: an array of paths excluded from optimization.

Additional flags: auto_convert, resize_large, processing_speed, avoid_larger, run_in_background, exclude_png_webp, exclude_png_avif.

## When to Use This Ability

Review your compression format and quality settings before running **nexter/bulk-optimize-images**.

Audit the current optimization config to check which paths are excluded or which flags are active.

Read current settings before calling **nexter/update-image-optimization** to avoid accidental overwrites.

## Related Documentation

nexter/update-image-optimization: Change format, quality, dimensions, or any compression setting

nexter/bulk-optimize-images: Run image compression after reviewing settings

nexter/get-bulk-image-optimizer-status: Check how many images are optimized and pending

## Frequently Asked Questions

**Q: Why is get-image-optimization returning an empty or default config?**
A: That usually means the Image Optimization extension is disabled in Nexter Extension settings. The ability is read-only, so it can only report what is already active. When the extension is enabled, it returns the full current configuration, including format, quality mode, dimensions, EXIF handling, and exclusion paths. If you are about to run bulk compression, this is the first thing to check so you do not optimize against a blank setup.

**Q: What image optimization settings does this ability actually read?**
A: It reads the full image optimization configuration object in Nexter Extension. That includes image_format, quality_mode, max_width, max_height, exif_data, exclude_paths, and additional flags like auto_convert, resize_large, processing_speed, avoid_larger, run_in_background, exclude_png_webp, and exclude_png_avif. That makes it useful when you need a complete snapshot instead of guessing which compression rules are active.

**Q: Should I check compression settings before running bulk image optimization?**
A: That is the safest workflow. nexter/get-image-optimization returns the current format and quality settings before nexter/bulk-optimize-images runs, so you can confirm the compression behavior first. This matters because the ability exposes things like webp or avif output format and balanced, lossless, or aggressive quality mode. Reviewing those values first helps avoid pushing a large batch with the wrong compression profile.

**Q: What is the difference between read-only image settings and update-image-optimization?**
A: nexter/get-image-optimization only reads the current configuration. nexter/update-image-optimization changes it. That split matters because you can inspect format, quality mode, dimensions, EXIF handling, and exclusion paths first, then update them only if needed. It also reduces accidental overwrites when you are auditing an existing setup in Nexter Extension.

**Q: When should I use get-image-optimization instead of just changing settings directly?**
A: Use it when you need a snapshot of the current compression setup before making changes or running a batch job. The ability is built for review: it returns output format, quality mode, maximum dimensions, EXIF handling, exclusion paths, and other flags in one read-only call. That makes it a good preflight check before nexter/update-image-optimization or nexter/bulk-optimize-images.
