GET /images/settings
Returns all image optimization settings and server capability flags.Response
Whether WebP conversion on upload is enabled.
Maximum image width in pixels.
0 means no limit.Maximum image height in pixels.
0 means no limit.JPEG compression quality (0–100). Default is
82.Map of registered image size keys to their width, height, crop, and name.
Whether the GD image library is available on the server.
Whether the Imagick extension is available on the server.
Whether WebP encoding is supported by the active image editor.
Whether AVIF conversion on upload is enabled.
Whether AVIF encoding is supported by the active image editor.
Whether SVG uploads are allowed.
List of role slugs permitted to upload SVG files.
Whether WebP sidecars are transparently served to supporting browsers.
Whether original files are deleted when replaced by WebP on upload.
POST /images/settings
Saves image optimization settings. Whenwebp_serve_webp is enabled, .htaccess rewrite rules are written to the uploads directory so the web server transparently serves .webp sidecar files.
Parameters
Enable automatic WebP conversion on image upload.
Maximum image width in pixels. Use
0 for no limit.Maximum image height in pixels. Use
0 for no limit.JPEG compression quality from
0 to 100. Defaults to 82.Enable automatic AVIF sidecar generation on upload.
Allow SVG file uploads.
Role slugs that can upload SVGs. Defaults to
["administrator"].Transparently serve
.webp sidecar files to browsers that accept WebP. Writes .htaccess rules to the uploads directory.Delete the original file and replace it with the WebP version on upload.
Response
Always
true on success.Confirmation message.
POST /images/regenerate
Regenerates thumbnail sizes for all image attachments in the media library. This is useful after changing image size settings.Response
Always
true on success.Number of images successfully processed.
Number of images that could not be processed (missing files or editor errors).
Summary message.
POST /images/convert
Available since v1.5.0
next_offset until has_more is false.
Parameters
Target format. Must be
webp or avif.Number of images to skip. Used for pagination. Defaults to
0.Images to process per call. Maximum is
50. Defaults to 10.Delete the original file and update the attachment record to point to the converted file. Only supported for
webp format.Response
Always
true.Number of images converted in this batch.
Number of images skipped because the converted version already existed.
Number of images that failed to convert.
true if there are more images to process.Offset to use in the next request when
has_more is true.GET /images/convert-stats
Available since v1.5.0
Parameters
Format to check stats for.
webp or avif. Defaults to webp.Response
Total number of convertible images (JPEG, PNG, GIF, BMP, TIFF) in the media library.
Number of images that already have a converted sidecar file on disk.
Number of images that have not yet been converted.
DELETE /images/convert
Available since v1.6.0
Parameters
Format of sidecar files to delete. Must be
webp or avif.Response
Always
true.Number of sidecar files deleted.
Summary message.
