Description
The “ims_download_image_preview” filter is used to modify the preview file path for download when other file sizes have not been found.
A plugin (or theme) can modify the path with the code:
<?php add_filter( 'ims_download_image_preview', 'filter_function_name'); ?>
The hook is located in the image-store/admin/download.php file.
Example
// Apply filter function change_ims_download_image_preview( $filepath, $file_id ) { return "/file/path/to/original/file.png"; } add_filter('ims_download_image_preview', 'change_ims_download_image_preview');
Note: $filepath is a string and $file_id is an integer.
Leave a Reply