Imagify is a great image compression service by the guys who made WP Rocket, as you will probably know you pay for usage with Imagify so you may not want your users all triggering bulk updates and consuming all your API usage. Lucky there is a simple function you can use to restrict access to the Imagify bulk optimising to a single user or users.

We will use a simple function to restrict Imagify access to a single user, in this case, the user will have the ID of 1. You will need to have a basic understanding of PHP to use this function and you will also need to know the ID of the user you want to grant access to.

The Function

 * Filter the user capacity used to operate Imagify.
 * @since  1.0
 * @author Grégory Viguier
 * @param  string $capacity  The user capacity.
 * @param  string $describer Capacity describer. Possible values are 'manage', 'bulk-optimize', 'manual-optimize', and 'auto-optimize'.
 * @return string
add_filter( 'imagify_capacity', 'private_imagify', 10, 2 );
function private_imagify( $capacity, $describer ) {
	if ( 'manage' !== $describer && 'bulk-optimize' !== $describer ) {
		return $capacity;

	$user_id = get_current_user_id();

	if ( 1 !== $user_id ) { // Put your user ID here.
		return 'nope';

	return $capacity;

Simply place this function in your theme functions, create a plugin or use Code Snippets.