ims_before_read_image

Description

The “ims_before_read_image” filter is used to modify the image full path before the image metadata is generated.

A plugin (or theme) can modify the path with the code:

<?php add_filter( 'ims_before_read_image', 'filter_function_name' ); ?>

The hook is located in the image-store/_inc/galleries.php file.

Example

// Apply filter
function change_ims_image_path( $path, $file_data ) {
return full/path/to/image/path.jpg";
}
add_filter('ims_before_read_image', 'change_ims_image_path');

Note: $path is an string, $file_data is an associative array returned by pathinfo().


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *