Pixavif: AVIF & WebP Converter, Image Optimizer 1.0.3 has 6 actions and 13 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Pixavif: AVIF & WebP Converter, Image Optimizer fires an action
add_action( 'pixavif_builder_cache_purged', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Pixavif: AVIF & WebP Converter, Image Optimizer is about to use
add_filter( 'pixavif_allowed_hosts', function( $unique ) {
// Change $unique here.
return $unique;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filters the hosts whose images Pixavif may wrap, for example a CDN host that * also serves the uploads-pixavif folder. */ apply_filters( 'pixavif_allowed_hosts', array_unique( $hosts ) ); -
/** * Fires after Pixavif cleared page builder caches, for example to purge a page * cache too. */ do_action( 'pixavif_builder_cache_purged' ); -
/** * Fires when a bulk run finishes. */ do_action( 'pixavif_bulk_finished', $summary ); -
/** * Fires after an attachment was converted. */ do_action( 'pixavif_converted', $attachment_id, $result ); -
/** * Filters the delivery methods. */ apply_filters( 'pixavif_delivery_methods', array( 'picture' => 'Pixavif_Delivery_Picture', 'rewrite' => 'Pixavif_Delivery_Rewrite', ) ); -
/** * Filters the conversion engines, in order of preference. */ apply_filters( 'pixavif_engines', array( new Pixavif_Engine_WP_Editor() ) ); -
/** * Filters whether the current request is an editor or preview that Pixavif * should leave alone. */ apply_filters( 'pixavif_is_editor_preview', false ); -
/** * Fires after Pixavif has wired every component. Add-ons hook in here. */ do_action( 'pixavif_loaded' ); -
/** * Filters the largest source file Pixavif converts, in bytes. */ apply_filters( 'pixavif_max_source_bytes', self::DEFAULT_MAX_BYTES ); -
/** * Filters the inline CSS printed for picture delivery. */ apply_filters( 'pixavif_picture_css', $css, $template ); -
/** * Filters the quality used for one conversion. */ apply_filters( 'pixavif_quality', Pixavif_Settings::quality_for( $format ), pixavif_formats()[ $format ], $attachment_id ); -
/** * Fires after Pixavif settings change. */ do_action( 'pixavif_settings_updated', $new, $old ); -
/** * Filters whether one size of an attachment is converted. */ apply_filters( 'pixavif_should_convert', true, $attachment_id, $name, $source['path'] ); -
/** * Filters whether an image is left without a <picture> wrapper. */ apply_filters( 'pixavif_skip_picture', false, $clean, $context ); -
/** * Filters the folder that holds converted images. */ apply_filters( 'pixavif_storage_dir', WP_CONTENT_DIR . '/uploads-pixavif' ); -
/** * Filters the public URL of the converted images folder. */ apply_filters( 'pixavif_storage_url', $url, $root ); -
apply_filters( 'https_local_ssl_verify', false ); -
apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ); -
do_action( 'pixavif_fs_loaded' );
Generated from Pixavif: AVIF & WebP Converter, Image Optimizer's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: