- if ( 'full' != $size && ( $data = image_get_intermediate_size($post_id, $size) ) )
- $filepath = path_join( dirname($filepath), $data['file'] );
+ if ( 'full' != $size && ( $data = image_get_intermediate_size($post_id, $size) ) ) {
+ $filepath = apply_filters('load_image_to_edit_filesystempath', path_join( dirname($filepath), $data['file'] ), $post_id, $size);
+ }