Update Image Optimization Ability: Configure Image Optimization Settings in WordPress

Key Takeaways

  • Updates image optimization settings in Nexter Extension with parameters like image_format, quality_mode, and max_dimensions.
  • Uses nexter/bulk-optimize-images to apply new configurations to existing images after settings are updated.
  • Returns success status and the updated settings object containing current image optimization configurations.
Table of Contents

The nexter/update-image-optimization ability updates the image optimization settings in Nexter Extension. You can configure the output format, quality mode, maximum dimensions, EXIF data handling, and processing behavior. Changes apply to future optimization runs. Existing images are not re-optimized automatically.

Key Takeaways

All parameters are optional. Only the fields you pass are updated.

Changing settings does not trigger re-optimization of already-processed images.

Use nexter/bulk-optimize-images after updating settings to apply the new config to existing images.

Use nexter/get-image-optimization to read current settings before making changes.

Required Setup

This ability ships with Nexter Extension (Free). If you do not have it installed, follow the guide on how to install and activate Nexter Extension first.

Parameters

**enabled** (boolean, optional) turns image optimization on or off.

**image_format** (string, optional) sets the output format. Options: webp, original, smart, avif.

**quality_mode** (string, optional) controls compression level. Options: balanced, lossless, aggressive.

**max_width** (integer, optional) sets the maximum image width in pixels. Images wider than this value are resized.

**max_height** (integer, optional) sets the maximum image height in pixels.

**auto_convert** (boolean, optional) enables automatic conversion of new uploads to the selected format.

**exif_data** (string, optional) controls EXIF metadata handling. Options: strip, keep.

**resize_large** (boolean, optional) enables resizing of images that exceed max_width or max_height.

**processing_speed** (string, optional) sets the CPU trade-off for optimization. Options: fast, balanced, slow.

**avoid_larger** (boolean, optional) skips optimization if the result would be larger than the original.

**exclude_paths** (array, optional) is a list of path patterns to skip during optimization.

**run_in_background** (boolean, optional) runs bulk optimization as a background job when enabled.

**exclude_png_webp** (boolean, optional) skips PNG files when converting to WebP format.

**exclude_png_avif** (boolean, optional) skips PNG files when converting to AVIF format.

What It Returns

The ability returns success (boolean) and the updated settings object with all current image optimization configuration values.

When to Use This Ability

Change the output format from WebP to AVIF for better compression on supported browsers.

Set maximum image dimensions before running nexter/bulk-optimize-images on a new site.

Exclude specific folders from optimization to protect manually edited images.

Related Documentation

Get Image Optimization Settings Ability: nexter/get-image-optimization

Bulk Optimize Images Ability: nexter/bulk-optimize-images

Restore Original Images Ability: nexter/restore-original-images

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!