Get Image Optimization Settings Ability: Read Compression Config in WordPress

Key Takeaways

  • nexter/get-image-optimization returns the current image optimization configuration in Nexter Extension, including format settings and quality mode.
  • Image Optimization extension must be enabled in Nexter Extension settings; otherwise, it returns an empty configuration.
  • Call nexter/get-image-optimization before nexter/bulk-optimize-images to confirm format and quality settings are correct.
Table of Contents

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

About the Author

sandip patel

WordPress Developer at POSIMYTH Innovations I am a passionate WordPress Developer at POSIMYTH Innovations, where I focus on building high-performance products and cutting-edge web experiences. Currently, I contribute to the development of major projects including The Plus Addons for Elementor, Sticky Header for Elementor, RankReady AI (LLM & SEO), and the SproutOS MCP server integration. I love bridging the gap between WordPress core functionality and modern AI capabilities. Beyond standard development.

Share your Thoughts

Get Instant Answers to all your questions about Nexter Blocks,
Extensions & Theme trained on 1000+ Docs and Videos

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!